Message74181
| Author |
enolte |
| Recipients |
enolte, loewis, stutzbach |
| Date |
2008年10月02日.17:20:26 |
| SpamBayes Score |
1.0162596e-07 |
| Marked as misclassified |
No |
| Message-id |
<1222968027.92.0.0396872077741.issue2810@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
To reproduce on Windows XP with Python 2.4, 2.5, and 2.6:
1. Import issue_2810.reg (it creates two keys under
HKCU\PythonTestUnicodeKeys: one with a one byte unicode char in the key,
the other with multiple 2-byte unicode chars)
2. Run the following:
import _winreg
key = _winreg.OpenKey( _winreg.HKEY_CURRENT_USER, "PythonTestUnicodeKeys" )
one_byte_key = _winreg.EnumKey( key, 0 )
two_byte_key = _winreg.EnumKey( key, 1 )
_winreg.CloseKey( key )
try:
unicode( one_byte_key )
except Exception, ex:
print "EnumKey didn't return a valid string:", ex
print "should be unicode, not str:", two_byte_key.__class__
for ch in two_byte_key:
print ord( ch ),
print "" |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年10月02日 17:20:28 | enolte | set | recipients:
+ enolte, loewis, stutzbach |
| 2008年10月02日 17:20:27 | enolte | set | messageid: <1222968027.92.0.0396872077741.issue2810@psf.upfronthosting.co.za> |
| 2008年10月02日 17:20:27 | enolte | link | issue2810 messages |
| 2008年10月02日 17:20:26 | enolte | create |
|