Sometimes (but not always) the UTF-16 conversion inserts a BOM. Skip it.
This commit is contained in:
parent
c7ba173a64
commit
3457d3adc7
|
@ -311,6 +311,8 @@ bool nsfont_split(const plot_font_style_t *fstyle,
|
|||
*char_offset = 0;
|
||||
*actual_x = 0;
|
||||
|
||||
if (*utf16 == 0xFEFF) utf16++;
|
||||
|
||||
while (utf8_pos < length) {
|
||||
if ((*utf16 < 0xD800) || (0xDBFF < *utf16))
|
||||
utf16next = utf16 + 1;
|
||||
|
|
Loading…
Reference in New Issue