From db76ee8d534cb5c7681e9013703b20ab5016b4fa Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Fri, 7 Jun 2013 08:50:27 +0000 Subject: UTFmax increased, Runeerror changed --- os/port/lib.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'os') diff --git a/os/port/lib.h b/os/port/lib.h index e50fd8cb..4a9974a2 100644 --- a/os/port/lib.h +++ b/os/port/lib.h @@ -38,10 +38,12 @@ extern int fullrune(char*, int); enum { - UTFmax = 3, /* maximum bytes per rune */ - Runesync = 0x80, /* cannot represent part of a UTF sequence */ - Runeself = 0x80, /* rune and UTF sequences are the same (<) */ - Runeerror = 0x80, /* decoding error in UTF */ + UTFmax = 4, /* maximum bytes per rune */ + Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */ + Runeself = 0x80, /* rune and UTF sequences are the same (<) */ + Runeerror = 0xFFFD, /* decoding error in UTF */ + Runemax = 0x10FFFF, /* 21-bit rune */ + Runemask = 0x1FFFFF, /* bits used by runes (see grep) */ }; /* -- cgit v1.2.3