This is the mail archive of the
cygwin
mailing list for the Cygwin project.
[1.7] wcwidth failing configure tests
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Tue, 12 May 2009 16:02:04 +0000 (UTC)
- Subject: [1.7] wcwidth failing configure tests
I noticed this failure in various configure scripts (findutils, coreutils, ...):
checking whether wcwidth works reasonably in UTF-8 locales... no
I've reduced it to a STC:
#include <locale.h>
#include <wchar.h>
int main ()
{
int i = 0;
if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
{
if (wcwidth (0x0301) > 0)
i |= 1;
if (wcwidth (0x200B) > 0)
i |= 2;
}
return i;
}
The return value should be 0 but is coming back as 3; 0x0301 is a combining
mark which should occupy no space on its own, and 0x200b is a 0-width space,
according to Unicode 5.1 (and earlier, to some extent). And that probably
means that other places within wcwidth() are broken.
--
Eric Blake
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/