coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performance bug of `wc -m`


From: Kaz Kylheku (Coreutils)
Subject: Re: performance bug of `wc -m`
Date: Thu, 24 May 2018 17:32:09 -0700
User-agent: Roundcube Webmail/0.9.2

On 2018-05-20 16:43, Bruno Haible wrote:
Kaz Kylheku wrote in
https://lists.gnu.org/archive/html/coreutils/2018-05/msg00036.html :

In what situation are there printable characters in the range [0, UCHAR_MAX) that
have a width > 1?

That's the wrong question. The question is which characters in this range
have width > 1 or <= 0.

The program below shows that the answer (on a glibc system) is:
The character 0x00AD (= SOFT HYPHEN) is printable but has width == 0.

I tried printing this on several terminals; all actually render something that is one character position wide.

A program which calculates column positions on a terminal will be wrong if 0xAD
has been printed, and it relies on this bogus datum from glibc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]