This is the mail archive of the cygwin-developers 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: Lone surrogates in UTF-8? (was: Re: Console codepage setting via chcp?)


On Sep 27 09:33, Andy Koppe wrote:
> >> The __utf8_wctomb function could just create the corresponding
> >> UCS-2 values if no first half has been encountered before. ?The
> >> __utf8_mbtowc function could simply allow these UCS-2 values again.
> >>
> >> That works (I just tested it) and is a small change, but is it really
> >> desirable to allow UCS-2 values in UTF-8 strings?
> >
> > I don't know.
> 
> Improved answer: Debian allows them!

Sure, just as almost any C library allows invalid UTF-8 5 and 6 byte
sequences to be converted to and from wchar_t (if sizeof(wchar_t) is 4).


Corinna

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


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