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.

classification
Title: test_strptime fails on Windows 7 french
Type: Stage:
Components: Unicode, Windows Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, ocean-city, vstinner
Priority: normal Keywords:

Created on 2011-09-22 21:09 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg144417 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-09-22 21:09
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)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\victor\cpython\lib\test\test_strptime.py", line 303, in test_timezone

    strp_output = _strptime._strptime_time(strf_output, "%Z")
  File "C:\victor\cpython\lib\_strptime.py", line 482, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "C:\victor\cpython\lib\_strptime.py", line 340, in _strptime
    data_string[found.end():])
ValueError: unconverted data remains:  (heure d\x92été)

======================================================================
FAIL: test_timezone (test.test_strptime.LocaleTime_Tests)
----------------------------------------------------------------------
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é)'}))

----------------------------------------------------------------------
msg144418 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-09-22 21:09
See also issue #10653.
msg144420 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2011-09-22 21:26
Isn't this a duplicate of #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.
msg145491 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-10-14 00:38
Yes, this issue is a duplicate of #10653.
History
Date User Action Args
2022-04-11 14:57:21adminsetgithub: 57238
2011-10-14 00:41:32vstinnersetstatus: open -> closed
2011-10-14 00:38:46vstinnersetresolution: duplicate
messages: + msg145491
2011-09-22 21:26:36belopolskysetnosy: + ocean-city
messages: + msg144420
2011-09-22 21:09:36vstinnersetmessages: + msg144418
2011-09-22 21:09:18vstinnersetnosy: + belopolsky
2011-09-22 21:09:04vstinnercreate