diff options
author | pommicket <pommicket@gmail.com> | 2023-07-14 11:22:55 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-07-14 11:23:51 -0400 |
commit | 34ef28ec01a2475d9629dcc3f1e7891b5c92acfe (patch) | |
tree | d05b1266a9a9b36d259bb4c27c864a8542f1a997 /unicode.h | |
parent | d27853b51f09c080b1c78201a947fcb6b6cc6b72 (diff) |
fix writing of unicode btwn U+8000 and U+FFFF
Diffstat (limited to 'unicode.h')
-rw-r--r-- | unicode.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -142,7 +142,7 @@ static size_t unicode_utf32_to_utf8(char *s, uint32_t c32) { *p++ = (uint8_t)(0xC0 | (c32 >> 6)); *p = (uint8_t)(0x80 | (c32 & 0x3F)); return 2; - } else if (c32 <= 0x7FFF) { + } else if (c32 <= 0xFFFF) { if (c32 < 0xD800 || c32 > 0xDFFF) { *p++ = (uint8_t)(0xE0 | ( c32 >> 12)); *p++ = (uint8_t)(0x80 | ((c32 >> 6) & 0x3F)); |