i18n bug regarding Arabic-Indic numbers needinfo.

Lars Knoll lars at trolltech.com
Wed Apr 21 07:17:33 BST 2004


On Tuesday 20 April 2004 20:10, Diego Iastrubni wrote:
> ביום שלישי, 20 באפריל 2004, 21:59, נכתב על ידי Shaheed:
> > On Tuesday 20 April 2004 08:26, Lars Knoll wrote:
> > > You might want to use QString number0 = QString::fromUtf8("১");
> >
> > Ah...thanks for pointing that out!
>
> But still, you need to replace the numbers to Latin ones before you
> actually send the parameters to pppd.

Number conversions in QString (ie. QString::toInt() etc) currently work for 
latin numbers or localized ones. This implies that Devanagari digits won't 
automatically work in a western locale. We're working on extending this, but 
there are some issues to solve first, mainly concerning the use of thousand 
separators in some locales. The QChar::digitValue() method will however 
always work.

The conversion could be done by doing a toInt() followed by a 
QString::number() or by asking for the digit value of every QChar, but it's 
really up to the application to do proper processing here before sending it 
of to an application expecting latin numbers.

Regards,
Lars

PS: The example with Bengali numbers won't work if you use QString::toInt() in 
a bengali locale because our locale database for some reason misses an entry 
for Bengali. I'll see if I can fix that for Qt 3.3.3.




More information about the kde-core-devel mailing list