| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS |
| X-Spam-Check-By: | sourceware.org |
| To: | cygwin AT cygwin DOT com |
| From: | Eric Blake <ebb9 AT byu DOT net> |
| Subject: | [1.7] wcwidth failing configure tests |
| Date: | Tue, 12 May 2009 16:02:04 +0000 (UTC) |
| Lines: | 29 |
| Message-ID: | <loom.20090512T154751-0@post.gmane.org> |
| Mime-Version: | 1.0 |
| User-Agent: | Loom/3.14 (http://gmane.org/) |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |