Skip to content

Conversation

TheVeryDarkness
Copy link

Add a system property for jre, so that System.out always uses UTF-8 encoding.

Add a system property for jre, so that System.out always uses UTF-8 encoding.
@TheVeryDarkness
Copy link
Author

I met an error about encoding as decsribed in #antlr4/a. In short, system.out in org.antlr.v4.gui.Interpreter may use other encoding such as GBK if not explicitly specified.
I thought it should be solved in java side, but later I found just a “-Dfile.encoding=UTF-8” is enough.
By the way, after adding this, an encoding can be added to arguments passed to subprocess.Popen in interp().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant