Skip to content

Console encoding inferred incorrectly on Java 21 #384

@jeff5

Description

@jeff5

I observe on Java 21 on Windows enumerating System.getProperties():

sun.stdout.encoding       = None
sun.stderr.encoding       = None
stdout.encoding           = u'ms936'
stderr.encoding           = u'ms936'
python.console.encoding   = u'cp850'

while up to 17 we get:

sun.stdout.encoding       = u'ms936'
sun.stderr.encoding       = u'ms936'
stdout.encoding           = None
stderr.encoding           = None
python.console.encoding   = u'ms936'

It was always a bit of a guessing game to choose an encoding, but it appears the answer is now in a standard place. Just not where we're currently looking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions