Win-specific: Workaround for CJK Extension B characters handling in QString::toUcs4(). Fix issue #107.

This commit is contained in:
Abs62 2012-07-19 16:53:15 +04:00
parent bdda29a267
commit eaa62e69a0

View file

@ -14,6 +14,12 @@ namespace gd
{
QVector< unsigned int > v = in.toUcs4();
// Fix for CJK Extension B characters
int n = v.size();
while( n > 0 && v[ n - 1 ] == 0 ) n--;
if( n != v.size() )
v.resize( n );
return wstring( v.constData(), v.size() );
}