From: K.Kosako Date: Sat, 6 Oct 2018 09:42:51 +0000 (+0900) Subject: UTF-8 supports code range from 0x0000 to 0x10FFFF. X-Git-Tag: v6.9.1~18^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=274ec40fc616a0af6d4230662d9d9a499dc05eb7;p=onig UTF-8 supports code range from 0x0000 to 0x10FFFF. UTF-8, a transformation format of ISO 10646 (https://tools.ietf.org/html/rfc3630) --- diff --git a/src/utf8.c b/src/utf8.c index 22a8db1..9ccf1bd 100644 --- a/src/utf8.c +++ b/src/utf8.c @@ -57,7 +57,7 @@ static const int EncLen_UTF8[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1 + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; static int @@ -280,7 +280,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag, OnigEncodingType OnigEncodingUTF8 = { mbc_enc_len, "UTF-8", /* name */ - 6, /* max enc length */ + 4, /* max enc length */ 1, /* min enc length */ onigenc_is_mbc_newline_0x0a, mbc_to_code,