PDA

View Full Version : dot gets converted into square with arabic language on Android 5 plateform



rohit
27th August 2014, 08:04
When I'm typing arabic string with "." in continuity, then this "." gets converted into a square automatically. But If I'm Using any other character(any English alphabet, any numeric, space etc) in between arabic string and ".", then "." will come perfectly.

Example:
-If I'm typing ".الجديد", then It will show "[]الجديد". I don't want this square at the place of "." I want ".الجديد" string in output.
Note: please treat [] as a square.

-If I'm trying like ".Aالجديد" or ".1الجديد" or ". الجديد", then I'm getting output similar to input string means ".Aالجديد" or ".1الجديد" or ". الجديد" without and square("[]") box.

So My question is, Is this is the problem in QT with arabic language or problem with arabic language itself.

Could anyone can help me. Thanks in advance.

Thanks,
Rohit

ChrisW67
28th August 2014, 12:06
The "square" is probably a placeholder for bytes in the string that are either invalid sequences or have no glyph in the current font.

Your editor or compiler could be mangling UTF8 input. Try this and see what you get:


#include <QtCore>

int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);

QString test = QString::fromUtf8("\x2E\xD8\xA7\xD9\x84\xD8\xAC\xD8\xAF\xD9\x8A\xD8\x AF");
qDebug() << test;
return 0;
}