You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2011-10-14.00:41:32.879>created_at=<Date2011-09-22.21:09:04.147>labels= ['expert-unicode', 'OS-windows']
title='test_strptime fails on Windows 7 french'updated_at=<Date2011-10-14.00:41:32.879>user='https://github.com/vstinner'
Python 3 uses wcsftime() to format a timestamp and decodes tzname[0] and tzname[1] from UTF-8. The problem is that both methods format the quote differently: U+0092 for wcsftime("%Z") and U+2019 in tzname[1].
>>> time.strftime("%Z")
'Paris, Madrid (heure d\x92été)'
>>> time.tzname
('Paris, Madrid', 'Paris, Madrid (heure d\u2019été)')
Traceback (most recent call last):
File "C:\victor\cpython\lib\test\test_strptime.py", line 78, in test_timezone
(timezone, self.LT_ins.timezone))
AssertionError: False is not true : timezone paris, madrid (heure d\x92été) not
found in (frozenset({'utc', 'paris, madrid', 'gmt'}), frozenset({'paris, madrid
(heure d\u2019été)'}))
Isn't this a duplicate of bpo-10653? In any case, this looks like a windows only issue, so I cannot move it further. Would be interested in resolution, though. Thanks for making me nosy.
Activity
vstinner commentedon Sep 22, 2011
Python 3 uses wcsftime() to format a timestamp and decodes tzname[0] and tzname[1] from UTF-8. The problem is that both methods format the quote differently: U+0092 for wcsftime("%Z") and U+2019 in tzname[1].
>>> time.strftime("%Z") 'Paris, Madrid (heure d\x92été)' >>> time.tzname ('Paris, Madrid', 'Paris, Madrid (heure d\u2019été)')======================================================================
ERROR: test_timezone (test.test_strptime.StrptimeTests)
----------------------------------------------------------------------
======================================================================
FAIL: test_timezone (test.test_strptime.LocaleTime_Tests)
----------------------------------------------------------------------
vstinner commentedon Sep 22, 2011
See also issue bpo-10653.
abalkin commentedon Sep 22, 2011
Isn't this a duplicate of bpo-10653? In any case, this looks like a windows only issue, so I cannot move it further. Would be interested in resolution, though. Thanks for making me nosy.
vstinner commentedon Oct 14, 2011
Yes, this issue is a duplicate of bpo-10653.