Open TheVeryDarkness opened 1 year ago
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().
Add a system property for jre, so that System.out always uses UTF-8 encoding.