Re: [dev] [PATCH] [st] Fix issues with wcwidth() returning -1 for

From: Marc André Tanner <mat_AT_brain-dump.org>
Date: Mon, 27 Oct 2014 13:03:49 +0100

On Mon, Oct 27, 2014 at 08:21:52AM +0100, k0ga_AT_shike2.com wrote:
> > On 26 October 2014 19:36, Dmitrij D. Czarkoff <czarkoff_AT_gmail.com> wrote:
> >> Apparently no workaround is needed - just use sane libc or avoid using
> >> new codepoints until glibc fixes that. Or, if you won't feel dirty
> >> after that, send a patch to glibc instead.
> >
> > 'Just using musl' doesn't seem feasible given a glibc-based system -
> > it's easier for smaller programs, but in the case of st i'd have to
> > rebuild xlib, xcb, xft, freetype, fontconfig, etc (and their
> > dependencies) against musl. Not to mention that musl doesn't implement
> > unicode 7.0 either, only up to 6.2.
>
> I tend to think that it is better fix the wrong software than add
> workarounds in the correct software. I don't have problems now,
> and I think is the same for almost all the users of st. Maybe you
> can add this patch to the wiki, because it is sure it will be useful
> for more people.
>
> If you really want to fix the problem you should send a patch
> to the glibc mailing list.

POSIX states for int wcwidth(wchar_t wc): "... or return -1 (if wc
does not correspond to a printable wide-character code)." Therefore
I think a return value of -1 should be handled gracefully.

Having said that in dvtm it seems completely broken at the moment,
no char shows up at all. Patches for that are certainly welcome ...

-- 
 Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0
Received on Mon Oct 27 2014 - 13:03:49 CET

This archive was generated by hypermail 2.3.0 : Mon Oct 27 2014 - 13:12:08 CET