Skip to content

Console encoding inferred incorrectly on Java 21 #384

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions