This is for 2-width characters, such as: '²' (U+00B2) and '½' (U+00BD).
These character should not be treated as invalid.
I have not yet investigated to see if I need to make other corrections.
This is just an obvious mistake that I found and immediately fixed.
// Valid: 110xxxxx 10xxxxxx ???????? ????????.
if ((macro_f_utf_char_t_to_char_1(sequence) & 0b11100000) == 0b11000000) {
- // Only first byte ranges 0xc3 or greater are valid.
- if (macro_f_utf_char_t_to_char_2(sequence) < 0xc3) {
+ // Only first byte ranges 0xc2 or greater are valid.
+ if (macro_f_utf_char_t_to_char_2(sequence) < 0xc2) {
return F_false;
}
// Valid: 110xxxxx 10xxxxxx ???????? ????????.
if ((first & 0b11100000) == 0b11000000) {
- // Only first byte ranges 0xc3 or greater are valid.
- if (second < 0xc3) {
+ // Only first byte ranges 0xc2 or greater are valid.
+ if (second < 0xc2) {
assert_int_equal(status, F_false);
continue;
// Valid: 110xxxxx 10xxxxxx ???????? ????????.
if ((first & 0b11100000) == 0b11000000) {
- // Only first byte ranges 0xc3 or greater are valid.
- if (second < 0xc3) {
+ // Only first byte ranges 0xc2 or greater are valid.
+ if (second < 0xc2) {
assert_int_equal(status, F_false);
continue;