On Sun, Nov 06, 2016 at 09:09:04AM +0000, Debian Bug Tracking System wrote:
[...]
> 
> As just discussed in http://bugs.debian.org/826596 it seems the output
> is printed as escaped ascii codes when the locale (on the receiving side)
> does not consider a character printable.
> 

  Not the locale, but the "isprint()" function, as the argument is an
integer (ch) from a char variable (*p) which is treated as an signed
character (and thus as a negative integer for 8 bit characters)..

  From the manual of "isprint":

  "These functions check whether c, which must have the value of an
unsigned char or EOF, ...".

  When the code is compiled with "-funsigned-char" the output is correct.

  This is a fundamental flaw in the cc-standard.  The program "less" (Debian
bug #594260 (-i)) has also shown it.
 
-- 
Bjarni I. Gislason

Reply via email to