mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Win-specific: Workaround for CJK Extension B characters handling in QString::toUcs4(). Fix issue #107.
This commit is contained in:
parent
bdda29a267
commit
eaa62e69a0
|
@ -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() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue