From: Gil <re...@bu...> - 2020-04-20 02:41:28
|
New submission from Gil <gcr...@us...>: Hi, We're trying to debug an issue with Jython 2.7 in z/OS. To recreate, we use 2 files test.py file has: ====== import sys sys.setdefaultencoding('ascii') import test2 ====== The test2.py file has: ======== import sys sys.setdefaultencoding('ascii') print "I am test2 file" ======= When executing test.py, we get the following error: com.ibm.bsf.BSFException: exception from Jython: Traceback (most recent call last): File "<string>", line 1, in <module> SyntaxError: Non-ASCII character in file '/local/bvt/bvt_was/test2.py', but no encoding declared; see http://www.python.org/peps/pep-0263.html We've tried executing with "script.encoding=Cp1047" added but that still fails with the above exception. For what it's worth, it seems to work when we use Jython 2.1. Is there we're missing on this? Or is this a bug (or change of behavior) with how encoding works in version 2.7? Thanks! ---------- components: Core messages: 13026 nosy: Rodriguez severity: normal status: open title: EBCDIC endo type: behaviour versions: Jython 2.7 _______________________________________ Jython tracker <re...@bu...> <https://bugs.jython.org/issue2874> _______________________________________ |