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 tim_evans
Date 2003-11-05.22:45:00
SpamBayes Score
Marked as misclassified
Logged In: YES 

I'm reopening the bug, because that doesn't seem to work:

>>> import time, locale
>>> locale.setlocale(locale.LC_ALL, '')
"Chinese_People's Republic of China.936"
>>> x = time.strftime('%B')
>>> x
>>> x.decode('mbcs')
>>> locale.getpreferredencoding()
>>> x.decode('cp1252')

The preferred encoding is returned as cp1252, which can't be
correct.  And niether cp1252 nor mbcs appear to decode the
string into anything containing the high-numbered characters
I would expect for chinese (neither of them changes the
string at all).

The following problems (may) exist:
1.  locale.getpreferredencoding() doesn't work.
2.  The string return by time.strftime() is not mbcs encoded.
3.  The documentation for time.strftime() doesn't say how
the string is encoded.
Date User Action Args
2007-08-23 14:18:07adminlinkissue836035 messages
2007-08-23 14:18:07admincreate