Message11859
That's great, Oti! It's really useful that you tried all those platform combinations. I was surprised you observed Console.encoding() to return null on Unix-like systems. That's another reason to do without it.
On balance, I think running chcp (for Windows) is better than depending on the launcher, since it covers Jython run in other ways. This is nicely done as a separate class. I would probably make it private so we have freedom to change. And raise ConsoleEncoding.get() to where getPlatformEncoding() is called. (It's a poor name, anyway.)
If it's a good approach for Windows, why not also for Unix-alikes? Is "locale charmap" portable?
I'm not sure about file.encoding, even as a last resort. It isn't for specifying the console encoding. I think going directly to a hard-coded fall-back is the honest choice (ascii or utf-8).
If you indicate you'd like to provide a change set I'll hold off. Otherwise I'll base something on your investigation (and credit you). |
|
Date |
User |
Action |
Args |
2018-03-28 08:01:56 | jeff.allen | set | messageid: <1522224116.25.0.467229070634.issue2659@psf.upfronthosting.co.za> |
2018-03-28 08:01:56 | jeff.allen | set | recipients:
+ jeff.allen, otmarhumbel, amak |
2018-03-28 08:01:56 | jeff.allen | link | issue2659 messages |
2018-03-28 08:01:54 | jeff.allen | create | |
|