This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients
Date 2003-01-22.09:15:55
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2008-01-20 09:55:55adminlinkissue672132 messages
2008-01-20 09:55:55admincreate