i18n bug regarding Arabic-Indic numbers needinfo.

Lars Knoll lars at trolltech.com
Tue Apr 20 08:26:34 BST 2004


You might want to use QString number0 = QString::fromUtf8("১");

In that case your test program works just fine.

Cheers,
Lars

On Tuesday 20 April 2004 00:03, Shaheed wrote:
> Oh dear, I suspect it affects all Indic languages. Qt (qt-copy from CVS
> head of a few days ago, Qt 3.3.1) fails for all the Bengali integers too:
>
> Latin...
> 0 is a number? 1
> Bengali...
> 0 is a number? 0
> 1 is a number? 0
> 2 is a number? 0
> 3 is a number? 0
> 4 is a number? 0
> 5 is a number? 0
> 6 is a number? 0
> 7 is a number? 0
> 8 is a number? 0
> 9 is a number? 0
>
> is the output from the attached program.
>
> #include <qstring.h>
> #include <iostream>
> using namespace std;
>
> int main(int argc, char **argv)
> {
>     QString number0("০");
>     QString number1("১");
>     QString number2("২");
>     QString number3("৩");
>     QString number4("৪");
>     QString number5("৫");
>     QString number6("৬");
>     QString number7("৭");
>     QString number8("৮");
>     QString number9("৯");
>
>     cout << "Latin..." << endl;
>     cout << "0 is a number? " << QString("0")[0].isNumber() << endl;
>     cout << "Bengali..." << endl;
>     cout << "0 is a number? " << number0[0].isNumber() << endl;
>     cout << "1 is a number? " << number1[0].isNumber() << endl;
>     cout << "2 is a number? " << number2[0].isNumber() << endl;
>     cout << "3 is a number? " << number3[0].isNumber() << endl;
>     cout << "4 is a number? " << number4[0].isNumber() << endl;
>     cout << "5 is a number? " << number5[0].isNumber() << endl;
>     cout << "6 is a number? " << number6[0].isNumber() << endl;
>     cout << "7 is a number? " << number7[0].isNumber() << endl;
>     cout << "8 is a number? " << number8[0].isNumber() << endl;
>     cout << "9 is a number? " << number9[0].isNumber() << endl;
> }




More information about the kde-core-devel mailing list