RFC: System.console().encoding()

Jochen Theodorou blackdrag at gmx.org
Thu Sep 15 10:05:04 UTC 2016

On 15.09.2016 09:21, Dawid Weiss wrote:
>> Console is supposed to be a "char/String" based class, "encoding" really
>> should have no business here in its api.
> While I agree with your concerns about the functional side of the API,
> I disagree about this method having no practical use. I can give you a
> concrete example. The use case that we had was to check whether the
> "terminal" (console) would be able to handle non-ASCII characters. A
> Writer doesn't tell you anything. An encoding does provide at least
> some confidence that certain characters will be translated properly --
> if your encoding is US-ASCII or ISO8859-1 then Polish diacritics won't
> get displayed for sure. This doesn't mean 100% confidence in actual
> glyph rendering of course, but it's a cheap and safe sanity check of
> the terminal's capabilities.

out of curiosity... what will you do if you find the encoding lacking 
what you need?

bye Jochen

More information about the core-libs-dev mailing list