[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Internal number storage



--- Mohammed Elzubeir wrote:
>
> Date: Fri, 25 Jan 2002 15:50:22 -0800
> From: David Dunham <dunham at mac dot com>
> To: <qt-interest at trolltech dot com>
> 
> On Friday, January 25, 2002, at 03:13, Mohammed Elzubeir wrote:
> 
> > For example, in Arabic, some Arab countries use the Hindi
> > number system, and others use the Arabic numerals (thankfully).
> > When writing an application, should the numbers be stored in
> > their ASCII encoding, and then rendered to either Hindi or
> > Arabic at the option of the user, or should it be stored as
> > Hindi numbers (internally) and then have the user choose between
> > the Arabic numerals vs. Hindi numerals?
> 
> That's kind of an interesting question.
> 
> I think in general you'll want to store numbers as numbers, i.e. not in 
> Unicode (there are after all no Hindi numerals in ASCII). This not only 
> lets you localize to different writing systems, but also to other 
> formats. For example, most Americans write "one million" as "1,000,000" 
> but many Europeans write "1.000.000" (and I think the British use 
> "1,000,000,000" -- oh wait, it's "one billion" they don't understand :-).

Is this a stated "opinion" or fact ?  In other words, what does the
world in large out there expect from an Arabic encoded document ?

I can see two issue here,

 1. Person write a document in which both "hindi" and "non-hindi"
    numbers are used, how is the distinction made (if all numbers are
    stored as ASCII) ?  if its based on context is this procedure
    formalized somehow (to get consistency among the various
    applications) ?

 2. I'm very inclined to the think the answer to #1 above is that
    its up-in-the-air.  Reason being, ISO-8859-6 includes the glyphs
    to those "hindi" numbers and considers them proper "Arabic" numbers
    (they are NOT in form-B for so-called "shaping").  Which would lead
    one to believe those encodings ought be used instead of ASCII
    (excuse the conjecture on my part :-)

What the user sees is NOT a problem (except in the case where both
number systems are intermixed in a document), so let's no get into
preferences and what people expect to see.  We are strictly talking
about what ought to be stored on disk.

What does the unicode (or any other) standard say about which encodings
should be stored (if they don't care and don't state anything, who does) ?

Roozbeh, do you have any insight into this, not from a preference
point of view, but from a "formal" method of doing things ?

 - Nadim


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com