Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update antlr4_tool_runner.py #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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