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:
- On my Windows virtual machine, run Autoplot v2019a_12 on 32 bit Java, using the jar left on the desktop.
- Use "Theta Θ Θ" for the plot title, and save as a .vap.
- start and restart Autoplot using the jar again.
- load and see that it loads incorrectly.
- start Autoplot from the Java debugger.
- note that the file loads properly.
A hiezenbug, what a pain. How do you plan to resolve it?
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.
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.
See also https://github.com/autoplot/dev/blob/master/bugs/sf/2234/printCharset.jy which was used to demo the bug.
Diff:
Diff: