Menu

#2387 possible (SVG) terminal output bug with unicode character output

None
closed-not-a-bug
nobody
None
2021-06-13
2020-12-29
gra364
No

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

2 Attachments

Related

Bugs: #2387

Discussion

  • Ethan Merritt

    Ethan Merritt - 2021-02-04
    • status: open --> open-not-a-bug
    • Group: -->
    • Priority: -->
     
    • gra364

      gra364 - 2021-02-10

      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:

      • status: open --> open-not-a-bug
      • Group: -->
      • Priority: -->
      • Comment:

      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.svg is 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 utf8 in 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.


      Status: open-not-a-bug
      Priority:
      Created: Tue Dec 29, 2020 10:21 PM UTC by Henry Granek
      Last Updated: Tue Dec 29, 2020 10:21 PM UTC
      Owner: nobody
      Attachments:

      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


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnuplot/bugs/2387/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #2387

  • Ethan Merritt

    Ethan Merritt - 2021-02-04

    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.svg is 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 utf8 in 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.

     
  • Ethan Merritt

    Ethan Merritt - 2021-06-13
    • status: open-not-a-bug --> closed-not-a-bug
     
  • Ethan Merritt

    Ethan Merritt - 2021-06-13

    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.svg is 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 utf8 in 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.

     

Log in to post a comment.