On Sat, Oct 25, 2014 at 11:15 PM, dequis wrote:
<...>
> My patch:
>
> Just wcwidth(...) -> abs(wcwidth(...))
>
> In other words: if wcwidth returns -1, interpret that as a column
> width of 1. It's a bit dirty and lazy, but it works wonderfully for
> most characters.
<...>
It's better than nothin
FRIGN said:
> >> DESCRIPTION
> >> The wcwidth() function returns the number of columns needed to
> >> represent the wide character c. If c is a printable wide
> >> character, the value is at least 0. If c
> >> is null wide character (L'\0'), the value is 0. Otherwise -1
> That's how POSIX-2001 defines it.
>
> So yeah, using abs() to "catch" the invalid case is fine, but could be
> refined even more.
>
Ok, it is true. We should catch this case, but I don't like the idea
of the abs. I think the correct solution should be print the invalid
character.
Regards,
On Mon, 27 Oct 2014 13:03:49 +0100
Marc André Tanner wrote:
> 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.
I have to agree here, even though I
On Mon, Oct 27, 2014 at 08:21:52AM +0100, k...@shike2.com wrote:
> > On 26 October 2014 19:36, Dmitrij D. Czarkoff 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 pat
> On 26 October 2014 19:36, Dmitrij D. Czarkoff 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
On 26 October 2014 19:36, Dmitrij D. Czarkoff 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-ba
Hiltjo Posthuma said:
> interestingly musl knows the correct character width.
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.
--
Dmitrij D. Czarkoff
On Sun, Oct 26, 2014 at 3:15 AM, dequis wrote:
>
> My patch:
>
> Just wcwidth(...) -> abs(wcwidth(...))
>
> In other words: if wcwidth returns -1, interpret that as a column
> width of 1. It's a bit dirty and lazy, but it works wonderfully for
> most characters.
>
> I'm not sure what the "correct"
Hi suckless! First, thanks for st. Been using it for a long while,
still impressed at how it gets a lot of stuff right - stuff that urxvt
failed miserably at. There's only one issue that has been bothering me
particularly.
The issue itself:
Unicode characters added since unicode 5.2 (released in
10 matches
Mail list logo