This is the mail archive of the
mailing list for the Cygwin project.
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 Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple