Bug #13412
closedtowlower(0x038A) is broken
0%
Description
towlower (0x038A) returns 0x03B0. According to the Unicode mapping tables, it should return 0x03AF instead.
Found in OpenIndiana Hipster 20171031.
How to reproduce:
$ gcc -Wall foo.c
$ ./a.out
Expected result:
towlower (0x038A) = 0x03AF
towupper (0x038A) = 0x038A
towlower (0x03AF) = 0x03AF
towupper (0x03AF) = 0x038A
towlower (0x03B0) = 0x03B0
towupper (0x03B0) = 0x03B0
Actual result:
towlower (0x038A) = 0x03B0
towupper (0x038A) = 0x038A
towlower (0x03AF) = 0x03AF
towupper (0x03AF) = 0x038A
towlower (0x03B0) = 0x03B0
towupper (0x03B0) = 0x03B0
Files
Updated by Andreas Wacknitz over 2 years ago
- File check-towlower.c check-towlower.c added
I have adapted your program to your expected results output and for me everything looks correct.
I have used gcc-10 because gcc-7 (the default) complains about the format (X instead of lX being used) but the results are the same for both compilers:
╭─andreas@skoll ~
╰─➤ gcc-10 --version
gcc-10 (OpenIndiana 10.2.0-oi-1) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
╭─andreas@skoll ~
╰─➤ gcc-10 check-towlower.c
╭─andreas@skoll ~
╰─➤ ./a.out
towlower (0x038A) = 0x03AF, (expected 0x03AF)
towupper (0x038A) = 0x038A, (expected 0x038A)
towlower (0x03AF) = 0x03AF, (expected 0x03AF)
towupper (0x03AF) = 0x038A, (expected 0x038A)
towlower (0x03B0) = 0x03B0, (expected 0x03B0)
towupper (0x03B0) = 0x03B0, (expected 0x03B0)
Updated by Bruno Haible over 2 years ago
Good. That means, the bug is already fixed in the current version.
Updated by Andreas Wacknitz over 2 years ago
- Status changed from New to Resolved