summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2014-06-01 08:44:51 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2014-06-01 08:44:51 +0100
commit3457d3adc7b94bb9e8715a35a0e5a8377db88856 (patch)
tree67b32243426643fec57c749847a76fe38ca1b4f2 /amiga
parentc7ba173a6405eca736ee7032330c00f9939e7c37 (diff)
downloadnetsurf-3457d3adc7b94bb9e8715a35a0e5a8377db88856.tar.gz
netsurf-3457d3adc7b94bb9e8715a35a0e5a8377db88856.tar.bz2
Sometimes (but not always) the UTF-16 conversion inserts a BOM. Skip it.
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/font.c2
1 files changed, 2 insertions, 0 deletions
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;