test case:
$ ascii à ('a' with accent, in case it gets mangled by SMTP)
ASCII -2/0 is decimal -32, hex ffffffe0, octal 37777777740, bits 00100000: meta-`
ok, 'à' ('a' with accent) isn't ASCII; then ascii should just say so, not
print such funny numbers.
thanks
--
paolo
Hello Paolo, thanks for your bugreport, and sorry for the long delay in answering. Hmm, that's strange. Say, this only occurs on the system console and not under X, right? At least that's the only place where I could reproduce it ... Cheers, Flo
no, that's in xterm. But on console I get same result-
This is harder to reproduce in a UTF-8 locale because multibyte characters do not exhibit this problem. Try this: $ ascii $(printf '\xff') ASCII 0/-1 is decimal -01, hex ffffffff, octal 37777777777, bits 00000001: meta-^_
Hello again, there's another bugreport in the Debian BTS I haven't forwarded yet, please see <http://bugs.debian.org/437945>. For the sake of completeness, please find attached the full debdiff of the current Debian package as it applies to your upstream work: some nametable fixes and simplified ascii.xml to make Debian xmlto actually build the manpage. Cheers, Flo
Florian Ernst <florian_ernst@gmx.net>: I see it. But I don't know what code point that á is generating, which makes troubleshooting it a bit difficult. These look equivalent to a set of markup fixes I already have. They'll be in 3.9.
On system with signed char, ascii would incorrectly handle bytes with the
highest bit set.
Before:
$ ascii $(printf '\xff')
ASCII 268435455/15 is decimal 4294967295, hex ffffffff, octal 37777777777, bits 11111111: meta-^_
After:
$ ascii $(printf '\xff')
ASCII 15/15 is decimal 255, hex ff, octal 377, bits 11111111: meta-^?
Fixes: https://bugs.debian.org/437945
---
ascii.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ascii.c b/ascii.c
index 4ad7d5b..8a6ff4d 100644
--- a/ascii.c
+++ b/ascii.c
@@ -224,7 +224,7 @@ static void ascii(char *str)
/* interpret single characters as themselves */
if (len == 1) {
- speak((unsigned int)str[0]);
+ speak((unsigned char)str[0]);
/* also interpret single digits as numeric */
if(!line && strchr("0123456789ABCDEFabcdef",str[0])) {
int hval;