3 ms·
If a CP932 '\' is interpreted as '¥', but is exported as CP932 '¥', there's data loss. Unless Python 3 keeps the original data around when it converts to Unicod
by halostatue 17y ago
If a CP932 '\' is interpreted as '¥', but is exported as CP932 '¥', there's data loss. Unless Python 3 keeps the original data around when it converts to Unicode (probably UTF-8 or UTF-16), there will be data loss in those cases. It's unavoidable.
- ominous_prime 17y agoUTF-\d is not unicode. Unicode isn't an encoding, it's the decoded representation of a character encoding. [edit] clarified example >>> s = u'\xa5' # shiftjis decoding of \ >>> print s.encode('shiftjis') \ >>> print s.encode('utf-8') ¥