[Python-3000] Unicode and OS strings

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Sep 15 00:40:00 CEST 2007


Stephen J. Turnbull wrote:
> You chose the context of round-tripping *across
> encodings*, not me.  Please stick with your context.

Maybe we have different ideas of what the problem is.
I thought the problem is to take arbitrary byte sequences
coming in as command-line args and represent them as
unicode strings in such a way that the can be losslessly
converted back into the same byte strings.

I was just pointing out that if you do this in a way
that involves some sort of dynamically generated mapping,
then it won't work if the round trip spans more than
one Python session -- and that there are any number of
ways that the data could get from one session to
another, many of them not involving anything that one
would recognise as a unicode encoding in the conventional
sense.

--
Greg


More information about the Python-3000 mailing list