Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
4.8.3, 5.2.0, 5.14.2
-
None
-
Any
Description
There is a bug when using QTextBoundaryFinder::Grapheme for searching grapheme groups and using Tamil encoding. The code snippet is:
// write all grapheme in the current sentence QTextBoundaryFinder boundryFinder(QTextBoundaryFinder::Grapheme, languageSentence); int prevIndex = 0; int nextIndex = boundryFinder.toNextBoundary(); QStringRef graphemeRef; QString debugChar; // Loop through sentence while (nextIndex != ERROR_MISSING_ENTRY) { // Get this grapheme and store its code graphemeRef = languageSentence.midRef(prevIndex, nextIndex - prevIndex); debugChar = languageSentence.mid(prevIndex, nextIndex - prevIndex); // Correct indexes prevIndex = nextIndex; // Store current index as previous nextIndex = boundryFinder.toNextBoundary(); // Get next index }
And the string is: பயன்படுத்த வழிமுறை:
Problem begins with grapheme ன்ப, which is taken together instead of separate grapheme. Next index shroud be 4 instead of five. The same thing happens with த்த and so on.