ctype bug

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Wed Jul 6 01:48:31 PDT 2005


Lately Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> said:
> :uhm, actually not... I was confused as well, but it was my utf-8 xterm
> :playing tricks on me. If you look close, the program just outputs
> :printable chars (at least on syscons), it skips some in between.
> :I don't get the system. As soon as you assign the int to any char
> :(signed, unsigned, plain) and pass this char, the negative numbers
> :are not shown.
>     Huh?  I didn't understand a word you said, could you rephrase?
> 
>     The problem I'm seeing is occuring when I pass a signed char to
>     isprint().  It doesn't matter if its a char or an int... either way
>     isprint() (and ispunct() and probably others) is returning non-zero
>     for unprintable character.  I know they are unprintable because the
>     program using the function builds up garbage in the xterm's input
>     queue because it was letting control characters through to the
>     terminal.

okay. i ran your program on console. it didn't output *all* negative
ints, just some, showing for example the line drawing characters,
or the german umlauts. it didn't show control characters. The
difference to -Release I can see is that we switched default charsets
it seems: from ASCII (0-127) to ISO 8859-1 (0-255).

the other char stuff was bogus, I was testing on the wrong machine...

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Attachment:
pgp00007.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00007.pgp
Type: application/octet-stream
Size: 189 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/commits/attachments/20050706/9ce24818/attachment-0022.obj>


More information about the Commits mailing list