[Python-Dev] Python and the Unicode Character Database (original) (raw)
M.-A. Lemburg mal at egenix.com
Thu Dec 2 23:58:07 CET 2010
- Previous message: [Python-Dev] Python and the Unicode Character Database
- Next message: [Python-Dev] Python and the Unicode Character Database
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alexander Belopolsky wrote:
On Thu, Dec 2, 2010 at 4:14 PM, M.-A. Lemburg <mal at egenix.com> wrote: ..
Have you tried Google ?
I tried google at I could not find any plain text or HTML file that would use Arabic-Indic numerals. What was interesting, though that a search for "quran unicode" (without quotes). Brought me to http://www.sacred-texts.com which says that they've been using unicode since 2002 in their archives. Interestingly enough, their version of Qur'an uses ordinary digits for ayah numbers. See, for example <http://www.sacred-texts.com/isl/uq/050.htm>. I will change my mind on this issue when you present a machine-readable file with Arabic-Indic numerals and a program capable of reading it and show that this program uses the same number parsing algorithm as Python's int() or float().
Have you had a look at the examples I posted ? They include texts and tables with numbers written using east asian arabic numerals.
Here's an example of a a famous Chinese text using Chinese numerals:
http://ctext.org/nine-chapters
Unfortunately, the Chinese numerals are not listed in the Category "Nd", so Python won't be able to parse them. This has various reasons, it seems, one of them being that the numeral code points were not defined as range of code points.
I'm sure you can find other books on mathematics in sanscrit or arabic scripts as well.
But this whole branch of the discussion is not going to go anywhere.
The point is that we support all of Unicode in Python, not just a fragment, and therefore the numeric constructors support all of Unicode.
Using them, it's very easy to support numbers in all kinds of variants, whether bound to a locale or not.
Adding more locale aware numeric parsers and formatters to the locale module, based on these APIs is certainly a good idea, but orthogonal to the ongoing discussion, IMO.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Source (#1, Dec 02 2010)
Python/Zope Consulting and Support ... http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/
- Previous message: [Python-Dev] Python and the Unicode Character Database
- Next message: [Python-Dev] Python and the Unicode Character Database
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]