Skip to content

Commit 9c8610b

Browse files
committed
Bug#20928289: DEFAULT CMAKE EXCLUDES UTF8_5624_1 CHARSET,
REQUIRED FOR MAIN.CTYPE_LDML The problem was that on platforms where char is unsigned, the server was unable to parse collation defintions which included non-7bit ASCII characters. Affected platforms include ARM and PowerPC. The reason was that the parsing code in once place used '> 0' to check if a character was 7 bit or not. This will fail if the char is unsigned. This patch fixes the problem by rewriting the check to check the MSB explicitly. No test added as coverage is already included by existing tests - e.g. main.ctype_ldml. This patch is a modified version of the contributed patch.
1 parent 73f2af0 commit 9c8610b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strings/ctype.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ scan_one_character(const char *s, const char *e, my_wc_t *wc)
424424
wc[0]= 0;
425425
return len;
426426
}
427-
else if (s[0] > 0) /* 7-bit character */
427+
else if ((s[0] & 0x80) == 0) /* 7-bit character */
428428
{
429429
wc[0]= 0;
430430
return 1;

0 commit comments

Comments
 (0)