Message11859

Author jeff.allen
Recipients amak, jeff.allen, otmarhumbel
Date 2018-03-28.08:01:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522224116.25.0.467229070634.issue2659@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2018-03-28 08:01:56jeff.allensetmessageid: <1522224116.25.0.467229070634.issue2659@psf.upfronthosting.co.za>
2018-03-28 08:01:56jeff.allensetrecipients: + jeff.allen, otmarhumbel, amak
2018-03-28 08:01:56jeff.allenlinkissue2659 messages
2018-03-28 08:01:54jeff.allencreate