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 AndiDog_old
Recipients AndiDog_old
Date 2010-04-03.15:08:42
SpamBayes Score 0.00065997575
Marked as misclassified No
Message-id <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za>
In-reply-to
Content
There is inconsistent behavior in time.strftime, comparing Python 2.6 and 3.1. In 3.1, non-ASCII Unicode characters seem to get dropped whereas in 2.6 you can keep them using the necessary Unicode-to-UTF8 workaround.

This should be fixed if it isn't intended behavior.

Python 2.6

>>> time.strftime(u"%d\u200F%A".encode("utf-8"), time.gmtime()).decode("utf-8")
u'03\u200fSaturday'
>>> time.strftime(u"%d\u0041%A".encode("utf-8"), time.gmtime()).decode("utf-8")
u'03ASaturday'

Python 3.1

>>> time.strftime("%d\u200F%A", time.gmtime())
''
>>> len(time.strftime("%d\u200F%A", time.gmtime()))
0
>>> time.strftime("%d\u0041%A", time.gmtime())
'03ASaturday'
History
Date User Action Args
2010-04-03 15:08:44AndiDog_oldsetrecipients: + AndiDog_old
2010-04-03 15:08:44AndiDog_oldsetmessageid: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za>
2010-04-03 15:08:42AndiDog_oldlinkissue8304 messages
2010-04-03 15:08:42AndiDog_oldcreate