[Python-3000] Unicode and OS strings

Hagen Fürstenau hagenf at CoLi.Uni-SB.DE
Fri Sep 14 14:46:34 CEST 2007


> They can easily roundtrip that then to the encoding that it should have:
> 
> good_string = sys.argv[bad_string_index].\
>    encode(sys.argv_encoding, "pua-replace").decode(real_encoding)

To me this doesn't look easier than sys.arguments() in the standard case 
and sys.arguments(encoding="whatever") if you know the special encoding.

Just my two cents...

- Hagen


More information about the Python-3000 mailing list