New submission from Ariel Ben-Yehuda <arie...@mail.tau.ac.il>: 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) ---------- messages: 164844 nosy: Ariel.Ben-Yehuda priority: normal severity: normal status: open title: unicode format does not really work in Python 2.x versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15276> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com