Issue2916

classification
Title: Saving output of script which has korean string to a file
Type: behaviour Severity: normal
Components: Any Versions: Jython 2.7.2
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mithunairani
Priority: Keywords:

Created on 2021-01-28.07:09:06 by mithunairani, last changed 2021-01-28.07:09:06 by mithunairani.

Files
File name Uploaded Description Edit Remove
korean_error.PNG mithunairani, 2021-01-28.07:09:06
Messages
msg13152 (view) Author: Mithun (mithunairani) Date: 2021-01-28.07:09:06
My Java code : 

PythonInterpreter interp = new PythonInterpreter() {
    {
        cflags = new CompilerFlags(CompilerFlags.PyCF_SOURCE_IS_UTF8);
    }
};
String outputPath = "C:\\views\\mithun.txt";
interp.setOut(new PrintWriter(new OutputStreamWriter(new FileOutputStream(outputPath), "UTF-8")));
String execScript = "abc = '헬로우'\r\n" + 		  		
					"print \"Printing Korean : \", abc";
interp.exec(execScript);

Doesnt pring the Koren characters correctly.
History
Date User Action Args
2021-01-28 07:09:06mithunairanicreate