delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/02/27/04:34:23

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 27 Feb 2009 10:34:01 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [1.7] wctomb bug
Message-ID: <20090227093401.GB27879@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <loom DOT 20090226T210806-72 AT post DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <loom.20090226T210806-72@post.gmane.org>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Feb 26 21:11, Eric Blake wrote:
> Simple test case.  This application uses the C locale (by virtue of the fact 
> that we did not use setlocale(), and evidenced by mb_cur_max of 1).  On Linux, 
> this correctly shows wctomb rejecting the conversion (0x100 is too big to fit 
> in a 1-byte sequence) with EILSEQ, but newlib currently truncates the invalid 
> wchar_t value to int and returns 1.

Yep, the underlying function _wctomb_r simply assumes that, when
running in a single byte locale, all incoming wchars are also
just single byte values.  I'll create a fix.

Btw., you're familiar with newlib, why didn't you just send a patch
to the newlib list?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019