Marc-Andre Lemburg <m...@egenix.com> added the comment: Ezio Melotti wrote: > > New submission from Ezio Melotti <ezio.melo...@gmail.com>: > > The decimal codec only handles characters in the Nd (Number, decimal) > Unicode category and whitespaces [a]. It is used by int(), float(), > complex() and indirectly by Decimal(), Fraction() and possibly others. > This works well only for plain digits (e.g. int(u'123')) but it > doesn't work for all the other characters used to represent numbers, like: > [...]
In general, Python has always stuck to the Unicode standard for these things (as well as others like casing, etc.). If the Unicode standard adopts a scheme for dealing with these issues, we should include support for it. Implementing something based on non-standards now and breaking that support later on in order to implement the true standards is not such a good idea. There is work underway to define a standard for locale specific formatting of numbers, dates, etc.: http://cldr.unicode.org/ Here's the TR with the data format specification: http://www.unicode.org/reports/tr35/tr35-12.html I'm sure that the information gathered in that project will sooner or later be folded back into the standard Unicode character database. Once that's done we can then use that information to e.g. determine the characters that make up a sign, decimal point, etc. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6632> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com