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 ezio.melotti
Recipients ezio.melotti, ocean-city
Date 2009-02-13.13:16:16
SpamBayes Score 6.3200584e-10
Marked as misclassified No
Message-id <1234530978.47.0.0534381679402.issue5240@psf.upfronthosting.co.za>
In-reply-to
Content
I think you have found the problem, strptime probably uses \s with the
re.ASCII flag and fails to match all the Unicode whitespaces:
>>> l
['\x1c', '\x1d', '\x1e', '\x1f', '%', '\x85', '\xa0', '\u1680',
'\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006',
'\u2007', '\u2008', '\u2009', '\u200a', '\u200b', '\u2028', '\u2029',
'\u202f', '\u205f', '\u3000']
>>> [bool(re.match('^\s$', char, re.ASCII)) for char in l]
[False, False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False, False,
False, False, False, False, False]
>>> [bool(re.match('^\s$', char)) for char in l]
[True, True, True, True, False, True, True, True, True, True, True,
True, True,True, True, True, True, True, True, True, True, True, True,
True, True]

This bug is then related #5239 and the proposed fix should work for both.
We can close this as duplicate and include this problem in #5239.

Good work!
History
Date User Action Args
2009-02-13 13:16:18ezio.melottisetrecipients: + ezio.melotti, ocean-city
2009-02-13 13:16:18ezio.melottisetmessageid: <1234530978.47.0.0534381679402.issue5240@psf.upfronthosting.co.za>
2009-02-13 13:16:17ezio.melottilinkissue5240 messages
2009-02-13 13:16:16ezio.melotticreate