Message60303
Logged In: YES
user_id=21627
The "traditional" Python approach is to return a byte string
if possible, for compatibility, and a Unicode object otherwise.
"If possible" often means "if the system default encoding
permits", or, as in _tkinter, "if the string is plain ASCII".
I expect one day people will complain that they can't access
certain registry keys, because those use characters not
supported in CP_ACP.
So it might be reasonable to use the *W functions
throughout, and convert to byte strings if they are ASCII,
and to Unicode objects otherwise. For incoming byte strings,
you probably have to assume they are CP_ACP encoded, for
compatibility with earlier Python releases. |
|
Date |
User |
Action |
Args |
2008-01-20 09:55:55 | admin | link | issue672132 messages |
2008-01-20 09:55:55 | admin | create | |
|