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 vstinner
Recipients vstinner
Date 2011-09-22.21:09:03
SpamBayes Score 1.1159573e-11
Marked as misclassified No
Message-id <1316725744.77.0.0655730808912.issue13029@psf.upfronthosting.co.za>
In-reply-to
Content
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é)'}))

----------------------------------------------------------------------
History
Date User Action Args
2011-09-22 21:09:04vstinnersetrecipients: + vstinner
2011-09-22 21:09:04vstinnersetmessageid: <1316725744.77.0.0655730808912.issue13029@psf.upfronthosting.co.za>
2011-09-22 21:09:04vstinnerlinkissue13029 messages
2011-09-22 21:09:03vstinnercreate