This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Proposal for new element(s) in LC_CTYPE


On Mon, Jan 19, 2004 at 11:42:50AM -0800, Ulrich Drepper wrote:
> Hamed Malek wrote:
> 
> > First, Defining necessary elements:
> > 
> > Our first idea was to define these two elements in LC_CTYPE:
> > 1. out_decimal_point
> > 2. out_thousands_sep
> 
> You can do this for your locale alone.  The implemented model allows
> locale-specific new classes to be defined.  You'll have to use the
> wctype() and iswctype() interfaces to use them.
> 
> 
> > 2. Do you agree with our suggested names?
> 
> I don't care, it's limited to your locale only.
>

No, This method can't solve our problem.
I explain the problem in more details:
                                                                                                                             
When we set the language to Persian, we want to see two types of
numbers:
                                                                                                                             
Complete Persian numbers with Persian digits and Persian decimal point.                                                                                                                              
And Complete English numbers with Latin digits and POSIX decimal point.
                                                                                                                             
By using 'I' flag in printf we see our Persian digits correctly.
But becuase we have only one decimal point which is defined to <U+066B>
we can't see Latin digits with its own decimal point.
The problem is this. Now, by defining new decimal point and setting our
main decimal point to '.' and setting the new decimal point to <U+066B>
we would see both correctly. Of course we also need to write a patch for
vfprintf and printf_fp and set the decimal point of I18n numbers ('%If')
to the new defined one in LC_CTYPE.
                                                                                                                             
The same problem occurs in Thousand-sep and maybe some other elements in
other categories.
                                                                                                                             
I recommended an alternative way too, which has some advantages
actually.
                                                                                                                             
Now I think it's clear that defining new classes only for our locale
won't solve our problem.
                                                                                                                             
Regards,
Hamed
~ 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]