Message18895
Logged In: YES
user_id=561705
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
'\xca\xae\xd2\xbb\xd4\xc2'
>>> x.decode('mbcs')
'\xca\xae\xd2\xbb\xd4\xc2'
>>> locale.getpreferredencoding()
'cp1252'
>>> x.decode('cp1252')
'\xca\xae\xd2\xbb\xd4\xc2'
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:07 | admin | link | issue836035 messages |
2007-08-23 14:18:07 | admin | create | |
|