From 3457d3adc7b94bb9e8715a35a0e5a8377db88856 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 1 Jun 2014 08:44:51 +0100 Subject: Sometimes (but not always) the UTF-16 conversion inserts a BOM. Skip it. --- amiga/font.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/amiga/font.c b/amiga/font.c index 93bee3cf0..8fc87d7f0 100755 --- a/amiga/font.c +++ b/amiga/font.c @@ -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; -- cgit v1.2.3