Issue2874
Created on 2020年04月20日.02:40:52 by Rodriguez, last changed 2020年04月20日.02:41:56 by Rodriguez.
| Messages | |||
|---|---|---|---|
| msg13026 (view) | Author: Gil (Rodriguez) | Date: 2020年04月20日.02:40:52 | |
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!
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020年04月20日 02:41:56 | Rodriguez | set | title: Jython 2,7 is not able to import an EBCDIC file on z/OS -> Jython 2.7 is not able to import an EBCDIC file on z/OS |
| 2020年04月20日 02:41:50 | Rodriguez | set | title: EBCDIC endo -> Jython 2,7 is not able to import an EBCDIC file on z/OS |
| 2020年04月20日 02:40:52 | Rodriguez | create | |
Supported by Python Software Foundation,
Powered by Roundup