diff options
-rw-r--r-- | enc/utf_16be.c | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -29,8 +29,9 @@ #include "regenc.h" -#define UTF16_IS_SURROGATE_FIRST(c) (c >= 0xd8 && c <= 0xdb) -#define UTF16_IS_SURROGATE_SECOND(c) (c >= 0xdc && c <= 0xdf) static const int EncLen_UTF16[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -55,7 +56,28 @@ static int utf16be_mbc_enc_len(const UChar* p, const OnigUChar* e ARG_UNUSED, OnigEncoding enc ARG_UNUSED) { - return EncLen_UTF16[*p]; } static int |