Python 3.1.1 bytes decode with replace bug
Joe
JoeSalmeri at hotmail.com
Mon Oct 26 15:57:55 EDT 2009
More information about the Python-list mailing list
Mon Oct 26 15:57:55 EDT 2009
- Previous message (by thread): Python 3.1.1 bytes decode with replace bug
- Next message (by thread): ANN: Jump 0.9.0 released!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks Mark, that is a great suggestion!
> You can also replace the Unicode replacement character U+FFFD with a valid
> cp437 character before displaying it:
>
> >>> b'\x80abc'.decode('utf8','replace').replace('\ufffd','?')
>
> '?abc'
>
- Previous message (by thread): Python 3.1.1 bytes decode with replace bug
- Next message (by thread): ANN: Jump 0.9.0 released!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list