This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.7] wctomb bug


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]