Message164844
| 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 | <1341668447.61.0.319523039673.issue15276@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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>
u'{:n}'.format(10000)
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) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2012-07-07 13:40:47 | Ariel.Ben-Yehuda | set | recipients: + Ariel.Ben-Yehuda |
| 2012-07-07 13:40:47 | Ariel.Ben-Yehuda | set | messageid: <1341668447.61.0.319523039673.issue15276@psf.upfronthosting.co.za> |
| 2012-07-07 13:40:47 | Ariel.Ben-Yehuda | link | issue15276 messages |
| 2012-07-07 13:40:46 | Ariel.Ben-Yehuda | create | |