]> granicus.if.org Git - onig/commitdiff
UTF-8 supports code range from 0x0000 to 0x10FFFF.
authorK.Kosako <kkosako0@gmail.com>
Sat, 6 Oct 2018 09:42:51 +0000 (18:42 +0900)
committerK.Kosako <kkosako0@gmail.com>
Sat, 6 Oct 2018 09:42:51 +0000 (18:42 +0900)
UTF-8, a transformation format of ISO 10646
(https://tools.ietf.org/html/rfc3630)

src/utf8.c

index 22a8db15357e5b9b2043b5a21eaa019d06ea8383..9ccf1bd4da98867ffaa77a459a3f72f87fffa201 100644 (file)
@@ -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,