Issue2065

classification
Title: LookupError: unknown encoding 'gbk' when run python script encoded by gbk
Type: behaviour Severity: critical
Components: Jythonc compiler Versions: Jython 2.7
process
Status: closed Resolution: duplicate
Dependencies: Need CJKCodecs - multibytecodecs
View: 1066
Superseder:
Assigned To: Nosy List: maxupeng, pjenvey
Priority: Keywords:

Created on 2013-07-03.02:43:35 by maxupeng, last changed 2013-07-03.04:10:12 by pjenvey.

Files
File name Uploaded Description Edit Remove
gbk.py maxupeng, 2013-07-03.02:43:34
Messages
msg8056 (view) Author: maxupeng (maxupeng) Date: 2013-07-03.02:43:34
Hello, when i run PythonInterpreter#execFile("gbk.py"), Jython complains: Exception in thread "main" LookupError: unknown encoding 'gbk'.
The attachment gbk.py's charset is gbk.
The Jython version is 2.7b1
The stack:
Thread [main] (Suspended (breakpoint at line 105 in codecs))	
	codecs.lookup(String) line: 105	
	codecs.encode(PyString, String, String) line: 233	
	PyUnicode(PyString).encode(String, String) line: 2531	
	PyUnicode(PyString).encode(String) line: 2527	
	GrammarActions.extractString(Token, String, boolean) line: 515	
	GrammarActions.extractStrings(List, String, boolean) line: 465	
	PythonParser.atom() line: 10996	
	PythonParser.power() line: 10363	
	PythonParser.factor() line: 10290	
	PythonParser.term() line: 9855	
	PythonParser.arith_expr() line: 9581	
	PythonParser.shift_expr() line: 9308	
	PythonParser.and_expr() line: 9141	
	PythonParser.xor_expr() line: 8978	
	PythonParser.expr(expr_contextType) line: 8814	
	PythonParser.comparison(expr_contextType) line: 8360	
	PythonParser.not_test(expr_contextType) line: 8287	
	PythonParser.and_test(expr_contextType) line: 8073	
	PythonParser.or_test(expr_contextType) line: 7911	
	PythonParser.test(expr_contextType) line: 7771	
	PythonParser.testlist_gexp() line: 11252	
	PythonParser.atom() line: 10619	
	PythonParser.power() line: 10363	
	PythonParser.factor() line: 10290	
	PythonParser.term() line: 9855	
	PythonParser.arith_expr() line: 9581	
	PythonParser.shift_expr() line: 9308	
	PythonParser.and_expr() line: 9141	
	PythonParser.xor_expr() line: 8978	
	PythonParser.expr(expr_contextType) line: 8814	
	PythonParser.comparison(expr_contextType) line: 8360	
	PythonParser.not_test(expr_contextType) line: 8287	
	PythonParser.and_test(expr_contextType) line: 8073	
	PythonParser.or_test(expr_contextType) line: 7911	
	PythonParser.test(expr_contextType) line: 7771	
	PythonParser.printlist() line: 3784	
	PythonParser.print_stmt() line: 3592	
	PythonParser.small_stmt() line: 2791	
	PythonParser.simple_stmt() line: 2524	
	PythonParser.stmt() line: 2438	
	PythonParser.file_input() line: 618	
	BaseParser.parseModule() line: 78	
	CompileMode$3.dispatch(BaseParser) line: 22	
	ParserFacade.parse(ParserFacade$ExpectedEncodingBufferedReader, CompileMode, String, CompilerFlags) line: 152	
	ParserFacade.parse(InputStream, CompileMode, String, CompilerFlags) line: 182	
	Py.compile_flags(InputStream, String, CompileMode, CompilerFlags) line: 1758	
	__builtin__.execfile_flags(String, PyObject, PyObject, CompilerFlags) line: 510	
	PythonInterpreter.execfile(String) line: 225	
	GBKModuleTest.main(String[]) line: 10
msg8057 (view) Author: Philip Jenvey (pjenvey) Date: 2013-07-03.04:10:12
This is a duplicate of #1066: Jython lacks CJKCodecs such as gbk
History
Date User Action Args
2013-07-03 04:10:12pjenveysetstatus: open -> closed
resolution: duplicate
dependencies: + Need CJKCodecs - multibytecodecs
messages: + msg8057
nosy: + pjenvey
2013-07-03 02:43:35maxupengcreate