Menu

#2234 UTF-8 encoing of .vap file on windows fail

nextrelease
open-fixed
nobody
None
5
2020-01-28
2020-01-27
No

George and Chris observed where theta (θ) is not encoded properly on Windows. This should work, though people can work-around this problem using "θ" to encode it like they would on a web page.

Here's the procedure:

  1. On my Windows virtual machine, run Autoplot v2019a_12 on 32 bit Java, using the jar left on the desktop.
  2. Use "Theta Θ Θ" for the plot title, and save as a .vap.
  3. start and restart Autoplot using the jar again.
  4. load and see that it loads incorrectly.
  5. start Autoplot from the Java debugger.
  6. note that the file loads properly.
1 Attachments

Discussion

  • Chris Piker

    Chris Piker - 2020-01-28

    A hiezenbug, what a pain. How do you plan to resolve it?

     
  • Jeremy Faden

    Jeremy Faden - 2020-01-28

    The first step is to clearly isolate it, and I think I finally have. My guess is that launching from a .jar uses a different setting of file.encoding from launching with the way I was doing it on Friday, so I'll be looking into that.

     
  • Jeremy Faden

    Jeremy Faden - 2020-01-28

    I think I've fixed this, asserting that the input stream used for the xml is UTF-8 before it's even handed off to the XML parser. This shows that Autoplot's code used to read XML files is a little odd, because it opens the stream as an InputStreamReader, which asserts a character encoding, so the character encoding within the stream is ignored. Since we assert that UTF-8 should always be used, this seems fine, but people should know that asserting a different encoding in the XML file will be ignored.

     
  • Jeremy Faden

    Jeremy Faden - 2020-01-28
    • status: open --> open-fixed
     
  • Jeremy Faden

    Jeremy Faden - 2020-01-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -George and Chris observed where theta (θ) is not encoded properly on Windows.  This should work, though people can work-around this problem using "θ" to encode it like they would on a web page.
    +George and Chris observed where theta (θ) is not encoded properly on Windows.  This should work, though people can work-around this problem using "θ" to encode it like they would on a web page.
    
     Here's the procedure:
    
     1. On my Windows virtual machine, run Autoplot v2019a_12 on 32 bit Java, using the jar left on the desktop.
    
     
  • Jeremy Faden

    Jeremy Faden - 2020-01-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,7 +2,7 @@
    
     Here's the procedure:
    
     1. On my Windows virtual machine, run Autoplot v2019a_12 on 32 bit Java, using the jar left on the desktop.
    -2. Use "Theta Θ Θ" for the plot title, and save as a .vap.
    +2. Use "Theta Θ Θ" for the plot title, and save as a .vap.
     3. start and restart Autoplot using the jar again.
     4. load and see that it loads incorrectly.
     5. start Autoplot from the Java debugger.
    
     
MongoDB Logo MongoDB