mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2026-02-16 14:59:29 +01:00
Fix conversions of Unicode characters above plane 0 (Issue #159)
This commit is contained in:
@@ -13,6 +13,7 @@ v1.6.2 - YYYY-MM-DD
|
||||
- Fixed xref reconstruction for objects lacking a `Type` value.
|
||||
- Fixed `pdfioPageOpenStream` for indirect `Contents` arrays.
|
||||
- Fixed an error propagation bug when reading too-long values (Issue #146)
|
||||
- Fixed a bug when converting Unicode characters above plane 0 (issue #159)
|
||||
- Fixed a Clang warning.
|
||||
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ _pdfio_utf16cpy(
|
||||
else
|
||||
{
|
||||
// 4-byte UTF-8
|
||||
*dstptr++ = (char)(0xe0 | (ch >> 18));
|
||||
*dstptr++ = (char)(0xf0 | (ch >> 18));
|
||||
*dstptr++ = (char)(0x80 | ((ch >> 12) & 0x3f));
|
||||
*dstptr++ = (char)(0x80 | ((ch >> 6) & 0x3f));
|
||||
*dstptr++ = (char)(0x80 | (ch & 0x3f));
|
||||
|
||||
Reference in New Issue
Block a user