Re: Unicode 4.01 bidi type changes

Behdad Esfahbod <[email protected]>
Newsgroups gmane.comp.internationalization.fribidi
Message-ID <[email protected]>
On Tue, 27 Apr 2004, Beni Cherniavsky wrote:
> It's a tough world :-(.  You have a point.  Perhaps it's not a good idea
> after all.

I go with the U+2212 MINUS SIGN.  Glibc has already limited
support for localized numerals, so printf("%Id\n", 123) will
print Persian digits under the fa_IR locate.  Recently Hamed
(CCed) extended that, to use localized decimal-point and
thousands-separator too.  Moreover, we worked with Bruno Haible
to add the support in gettext, such that it removes the "%Id"
non-portable "I" flag on systems that does not support it.  So
when translating, you can translate "%d" to "%Id" to get
localized digits...

TODO 1:  Glibc should use U+2212 MINUS SIGN in negative numbers
printed with i18n ("I") flag.  Or if not acceptable (which is 99%
the case), the locale should be able to localize the minus sign.
Should be pretty straightforward to do after Hamed's patch.

Glibc also supports parsing localized digits by scanf("%Id"...)
too, but due to some problems in the ISO C standard, it's broken
now.  The same problems prevent Glibc to accept localized digits
by isdigit, iswdigit, strtod and other friend functions, which is
really sad :(.  So the only hope is to fix scanf("%Id") which is
already a GNU C extension.  Perhaps Glib can later hide this
problem, by using scanf instead of strtod, but it's probably
going to be a performance hit.  So:

TODO 2:  Glibc should recognize localized digits in scanf family
of functions with i18n ("I") flag.  Moreover, it should accept
U+2212 MINUS SIGN, and localized decimal-point and
thousands-separator too.

Any idea?

Hamed, we are waiting for your patch to be applied :).  It's much
needed now due to the change in Unicode data files.

Cheers,
--behdad

PS. Oh, But wait:  What about plus sign??  It all smells really
bad.  Right now there are only three characters as type ES, and
the three are:

  U+002B PLUS SIGN
  U+002D HYPHEN-MINUS
  U+FF0F FULLWIDTH SOLIDUS

Note that how:

  * PLUS SIGN is ES, while PLUS-MINUS SIGN is still in ET!

  * HYPHEN-MINUS is ES, while HYPHEN is ON and MINUS SIGN is ET!

  * FULLWIDTH SOLIDUS is ES, while SOLIDUS is moved to CS!


We're gonna experience crazy things soon...

Cheers
poor behdad.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.