Hi Bruno. This type of error is usually due to the wrong encoding being used, or having the file being tagged with the wrong encoding. We recommend that you encode & tag your scripts with either IBM-1047 or ISO8859-1. Would you be able to verify the following:
1) That the file contains either text encoded in IBM-1047 or ISO8859-1?
2) That the file is tagged with the correct encoding that reflects IBM-1047 or ISO8859-1?
The simplest way to do these is to run the following commands:
ls -T dd.py
This will output what the file is tagged as (binary, untagged, IBM-1047, ISO8859-1). To tag the file with the encoding you expect, you can run one of the following to change the file tag to a given encoding.
chtag -tc IBM-1047 dd.py # Change the file tagging to IBM-1047
chtag -tc ISO8859-1 dd.py # Change the file tagging to ISO8859-1
After the file is tagged with the correct encoding, you can simply try to read the file to confirm:
_BPXK_AUTOCVT=ON cat dd.py
If there are any corrupted characters, then the file does not contain that encoding and needs to be addressed.
If you follow all of those steps and do not see any corrupted characters, could you provide us some information:
1) The output to running ls -T dd.py
2) The output to running _BPXK_AUTOCVT=ON cat dd.py
3) The version of Python that you're currently using, which can be obtained by running python3 --version
Thanks
------------------------------
Steven Pitman
------------------------------