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: Mg3a - a version of Mg2a developed on Cygwin


On Feb 24 12:40, Bengt Larsson wrote:
> Corinna Vinschen wrote:
> >> Using wcswidth isn't very useful in the editor because it has special
> >> requirements, like showing control characters with ^C.
> >
> >Well, it's not really such a big problem to special case wide char
> >control values and just call wcswidth otherwise...
> 
> Oh I see. wcwidth takes a wchar_t. Handily, Kuhn's implementation takes
> an UCS character. Now I understand what you mean by wcswidth.

Yeah, newlibs wcswidth combines UTF-16 surrogates into UCS-32 chars
and calls the internal __wcwidth function, which is basically Kuhn's
code, and which takes a wint_t as parameter.  Since wint_t is 32 bit...
Of course, this trick doesn't work for wcwidth, which will blindly
call __wcwidth with every incoming surrogate half.


Corinna

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

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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