From: Kevin Day Date: Sun, 12 Jun 2022 03:45:03 +0000 (-0500) Subject: Bugfix: Problems exposed by unit tests in f_utf. X-Git-Tag: 0.5.10~50 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=d21a99defc5b5cbd9d7f44c626d6479a55b4f34a;p=fll Bugfix: Problems exposed by unit tests in f_utf. Only UTF-8 symbols are tested. --- diff --git a/level_0/f_utf/c/private-utf_symbol.c b/level_0/f_utf/c/private-utf_symbol.c index 3de39ed..e2e87bb 100644 --- a/level_0/f_utf/c/private-utf_symbol.c +++ b/level_0/f_utf/c/private-utf_symbol.c @@ -626,8 +626,13 @@ extern "C" { return F_true; } - // Halfwidth and Fullwidth Forms: U+FFE9 to U+FFEC. - if (character >= 0xefbfa900 && character <= 0xefbfac00) { + // Halfwidth and Fullwidth Forms: U+FFE8 to U+FFEE. + if (character >= 0xefbfa800 && character <= 0xefbfae00) { + return F_true; + } + + // Specials: U+FFFC to U+FFFD. + if (character == 0xefbfbc00 || character == 0xefbfbd00) { return F_true; } } diff --git a/level_0/f_utf/c/utf/is.c b/level_0/f_utf/c/utf/is.c index adb3766..a543c0a 100644 --- a/level_0/f_utf/c/utf/is.c +++ b/level_0/f_utf/c/utf/is.c @@ -668,7 +668,7 @@ extern "C" { } // ASCII: U+003C ('<') to U+003E ('>'). - if (character[0] > 0x3c && character[0] < 0x3e) { + if (character[0] >= 0x3c && character[0] <= 0x3e) { return F_true; } diff --git a/level_0/f_utf/c/utf/is_character.c b/level_0/f_utf/c/utf/is_character.c index 44e9c1b..ba722d3 100644 --- a/level_0/f_utf/c/utf/is_character.c +++ b/level_0/f_utf/c/utf/is_character.c @@ -408,7 +408,7 @@ extern "C" { } // ASCII: U+003C ('<') to U+003E ('>'). - if (character > 0x3c000000 && character < 0x3e000000) { + if (character >= 0x3c000000 && character <= 0x3e000000) { return F_true; }