[Python-3000] Unicode and OS strings

Hagen Fürstenau hagenf at CoLi.Uni-SB.DE
Fri Sep 14 11:15:00 CEST 2007


Is it too unreasonable to keep the byte strings we get from the OS as 
byte strings in Python (since we're not sure about their encoding) and 
offer functions for getting strings?

sys.argv could be of type bytes and sys.arguments (or whatever) could be 
a function taking an encoding parameter (which defaults to UTF-8) and 
returning strings.

Of course that's backwards incompatible and I'm not sure if it's too 
late for something like this now.

- Hagen


More information about the Python-3000 mailing list