This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: String changes whether or not '\x81' is present
Type: behavior Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: dagnam, r.david.murray
Priority: normal Keywords:

Created on 2017-03-03 16:04 by dagnam, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg288900 - (view) Author: (dagnam) Date: 2017-03-03 16:04
print '\xa3\xb5\xdd\xf7\xa9\xa7\xab\xd8\xef\xc7\xac\xf4\xfb\xb7'
#gives
£µÝ÷©§«ØïǬôû·

print '\xa3\xb5\xdd\xf7\xa9\xa7\xab\xd8\xef\xc7\xac\xf4\xfb\xb7\x81'
#gives 
ᆪᄉÝ÷ᄅᄃᆱØïǬôûᄋチ

print '\x81\xa3'        print '\xa3'
チᆪ                      £
msg288903 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-03-03 17:17
It works fine for me.  If I write the data to a file (using print) and look at it with vi, I see your expected string with <81> on the end.  It also works fine in my console (which otherwise produces mostly unknown character glyphs; I'm using a utf8 locale) if I use unicode, or python3.

So, the problem is not with python, it must be your terminal emulator or whatever else it is you are using to inspect the results.
History
Date User Action Args
2022-04-11 14:58:43adminsetgithub: 73899
2017-03-03 17:17:36r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg288903

resolution: third party
stage: resolved
2017-03-03 16:04:43dagnamcreate