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 Subject: [1.7] wcwidth failing configure tests Date: Tue, 12 May 2009 16:02:04 +0000 (UTC) Lines: 29 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: List-Subscribe: List-Archive: List-Post: List-Help: , 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 #include 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/