Bartek Bok 13 years ago
parent
commit
7481a1b5bb
  1. 8
      Sources/Plasma/CoreLib/plString.cpp

8
Sources/Plasma/CoreLib/plString.cpp

@ -162,11 +162,11 @@ void plString::IConvertFromUtf16(const uint16_t *utf16, size_t size)
*dp++ = 0x80 | ((unichar >> 6) & 0x3F);
*dp++ = 0x80 | ((unichar ) & 0x3F);
} else if (*sp > 0x7FF) {
*dp++ = 0xF0 | ((*sp >> 12) & 0x0F);
*dp++ = 0xE0 | ((*sp >> 12) & 0x0F);
*dp++ = 0x80 | ((*sp >> 6) & 0x3F);
*dp++ = 0x80 | ((*sp ) & 0x3F);
} else if (*sp > 0x7F) {
*dp++ = 0xF0 | ((*sp >> 6) & 0x1F);
*dp++ = 0xC0 | ((*sp >> 6) & 0x1F);
*dp++ = 0x80 | ((*sp ) & 0x3F);
} else {
*dp++ = (char)(*sp);
@ -227,11 +227,11 @@ void plString::IConvertFromWchar(const wchar_t *wstr, size_t size)
*dp++ = 0x80 | ((*sp >> 6) & 0x3F);
*dp++ = 0x80 | ((*sp ) & 0x3F);
} else if (*sp > 0x7FF) {
*dp++ = 0xF0 | ((*sp >> 12) & 0x0F);
*dp++ = 0xE0 | ((*sp >> 12) & 0x0F);
*dp++ = 0x80 | ((*sp >> 6) & 0x3F);
*dp++ = 0x80 | ((*sp ) & 0x3F);
} else if (*sp > 0x7F) {
*dp++ = 0xF0 | ((*sp >> 6) & 0x1F);
*dp++ = 0xC0 | ((*sp >> 6) & 0x1F);
*dp++ = 0x80 | ((*sp ) & 0x3F);
} else {
*dp++ = (char)(*sp);

Loading…
Cancel
Save