There appears to be a problem trying to display UNICODE character(s) in the current Windows version of gnuplot, gp541-win64-mingw.exe (5.4 patchlevel 1) such as "°" (degree) - it displays as "°" instead for both "qt" and SVG terminal types. The error is not showing in the "wxt" terminal though
Thank you very much for your most helpful advice. I guess because this
problem occurred on a couple of output formats, but not every case, and
only for that particular character, it did not make me think that one of
the settings may be incorrect.
Incidentally, since svg is just a text file, I used to edit out the stray
character, but that didn't seem very tidy and would be very tedious for
multiple svg files.
Cheerio and thanks again,
Henry
On Fri, Feb 5, 2021 at 5:45 AM Ethan Merritt sfeam@users.sourceforge.net
wrote:
Related
Bugs:
#2387Your script is in UTF-8 encoding. SVG is based on XML, which so far as I know also wants UTF-8 encoding. What has gone wrong in your output file
_test.svgis that the first line claims that the encoding is something else:<?xml version="1.0" encoding="windows-1252" standalone="no"?>If you edit this line to correctly note that the encoding used is "utf8", or delete the line altogether, then the file displays correctly.
A better fix is to insert the command
set encoding utf8in your gnuplot script. This is self-evidently correct and matches the request for svg output.It might also work to edit your script file so that it really is in the windows-1252 encoding and uses the corresponding byte sequence for the degree sign. I am not sure whether svg-viewing programs would correctly handle the encoding.
Your script is in UTF-8 encoding. SVG is based on XML, which so far as I know also wants UTF-8 encoding. What has gone wrong in your output file
_test.svgis that the first line claims that the encoding is something else:<?xml version="1.0" encoding="windows-1252" standalone="no"?>If you edit this line to correctly note that the encoding used is "utf8", or delete the line altogether, then the file displays correctly.
A better fix is to insert the command
set encoding utf8in your gnuplot script. This is self-evidently correct and matches the request for svg output.It might also work to edit your script file so that it really is in the windows-1252 encoding and uses the corresponding byte sequence for the degree sign. I am not sure whether svg-viewing programs would correctly handle the encoding.