[Python3] Reading a binary file and wrtiting the bytes verbatim?in an utf-8 file
fab at slick.airforce-one.org
fab at slick.airforce-one.org
Sun Apr 25 03:46:11 EDT 2010
> Another possibility is to open the file in binary mode and do the
> encoding yourself when writing text. This might actually be a better
> solution, since I'm not sure RTF uses utf-8 by default.
Yes, thanks for this suggestion, it seems the best to me. Actually RTF
is not UTF-8 encoded, it's 8-bit and maybe even ASCII only. Every
unicode char has to be encoded as an escape sequence (\u2022 for
example).
Thanks again.
--
Fabrice DELENTE
More information about the Python-list
mailing list