Bug#785543: libc6-dev: iswalnum(0x345) incorrectly return 1
Package: libc6-dev
Version: 2.19-17
Severity: normal
Dear Maintainer,
In Greek traditional text analysis, the iota subscript (U+0345) is often talked about as a "diacritic", see:
"http://en.wikipedia.org/wiki/Iota_subscript"
In the recourse: http://www.unicode.org/ucd/
I found two documents:
1. http://www.unicode.org/Public/UCD/latest/charts/CodeCharts.pdf
2. http://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
In the first document in the section: "Combining Diacritical Marks" I found this character in the table. See at the screenshot https://yadi.sk/i/F_A04mo7gRMvd.
In the second document in line 752 we have:
0300..034E ; Diacritic # Mn [79] COMBINING GRAVE ACCENT..COMBINING UPWARDS ARROW BELOW
As a result, I think, it is pretty clear that iswalnum(0x345) should not return 1, but rather 0.
To test the function iswalnum(), I created a simple code:
===
#include <stdio.h>
#include <locale.h>
#include <wctype.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#define HAVE_CONFIG_H 1
int main (int argc, char** argv)
{
if (!setlocale(LC_CTYPE, "")){
perror("setlocale(3) failed");
return 1;
}
wchar_t wc;
mbtowc (NULL, NULL, 0);
mbtowc(&wc, argv[1], strlen(argv[1]));
printf("iswalnum(0x%" PRIxMAX ")=%d\n", (intmax_t) wc, iswalnum(wc));
return 0;
}
===
I put this code in a file test4iswalnum.c, then compiled:
$ gcc -Wall -o test4iswalnum test4iswalnum.c
Then I check the function iswalnum():
$ LC_CTYPE='C.UTF-8' ./test4iswalnum ͅ
iswalnum(0x345)=1
-- System Information:
Debian Release: 8.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-042stab105.14 (SMP w/1 CPU core)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages libc6-dev depends on:
ii libc-dev-bin 2.19-17
ii libc6 2.19-17
ii linux-libc-dev 3.16.7-ckt7-1
libc6-dev recommends no packages.
Versions of packages libc6-dev suggests:
pn glibc-doc <none>
ii manpages-dev 3.74-1
-- no debconf information
Reply to: