STINNER Victor <[email protected]> added the comment:
Oh wait. PEP 383 is a solution to store undecodable bytes in an unicode string,
but for mbcs I'm trying to get the opposite: store unicode in bytes and this is
not possible (at least with PEP 383).
Example with Python 3.1:
>>> print("abcŁdef".encode("cp1252", "surrogateescape"))
...
UnicodeEncodeError: 'charmap' codec can't encode character '\u0141' in position
3: character maps to <undefined>
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9821>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com