Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)
anatoly techtonik
techtonik at gmail.com
Fri May 29 10:41:30 EDT 2015
On Fri, May 29, 2015 at 2:39 PM, Laura Creighton <lac at openend.se> wrote:
> Do you know about the codecs module?
>
> reading http://pymotw.com/2/codecs/ may be useful if this is new to you.
Does that work for Python 2 and Python 3?
> Have you read https://www.python.org/dev/peps/pep-0293/ ?
No.
> Will backslashreplace do what you want?
I don't know. I am sorry, but what is there the code that
does this:
binary -> escaped utf-8 string -> unicode -> binary
I know about coding module, but I am not seeing a solution
to crash-proof output from Python. Is inserting a custom codec
class into every piece of code that I want to debug is the only
solution?
--
anatoly t.
More information about the Python-list
mailing list