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 Ariel.Ben-Yehuda
Recipients Ariel.Ben-Yehuda
Date 2012-07-07.13:40:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
unicode formats (u'{:n}'.format) in python 2.x assume that the thousands seperator is in ascii, so this fails:

>>> import locale
>>> locale.setlocale(locale.LC_NUMERIC, 'fra') # or fr_FR on UNIX
>>> u'{:n}'.format(10000)
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 2: ordinal not in range(128)

However, it works correctly in python 3, properly returning '10\xA00000' (the \xA0 is a nbsp)
Date User Action Args
2012-07-07 13:40:47Ariel.Ben-Yehudasetrecipients: + Ariel.Ben-Yehuda
2012-07-07 13:40:47Ariel.Ben-Yehudasetmessageid: <>
2012-07-07 13:40:47Ariel.Ben-Yehudalinkissue15276 messages
2012-07-07 13:40:46Ariel.Ben-Yehudacreate