GNU bug report logs -
#31376
26.0.50; print-charset-text-property not honored
Previous Next
Reported by: Helmut Eller <eller.helmut <at> gmail.com>
Date: Mon, 7 May 2018 06:50:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.0.50
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: handa <at> gnu.org, 31376 <at> debbugs.gnu.org, schwab <at> linux-m68k.org, eller.helmut <at> gmail.com
> Date: Sun, 13 May 2018 14:29:58 -0400
>
> > If the value is @code{default}, print only those @code{charset} text
> > properties that are ``unusual'' for the respective characters under
> > the current language environment. The @code{charset} property of a
> > character is considered unusual if its value is different from what
> > @code{char-charset} returns for that character.
>
> Okay, when writing up some tests I may have found another minor bug, or
> at least something which contradicts the text above. Is there supposed
> to be an exception for ascii characters?
Yes, you can see that in print_check_string_charset_prop:
charset = XCAR (XCDR (val));
for (i = 0; i < LENGTH (interval); i++)
{
FETCH_STRING_CHAR_ADVANCE (c, string, charpos, bytepos);
if (! ASCII_CHAR_P (c) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
&& ! EQ (CHARSET_NAME (CHAR_CHARSET (c)), charset))
{
print_check_string_result |= PRINT_STRING_UNSAFE_CHARSET_FOUND;
break;
}
}
CHAR_CHARSET always returns 'ascii' for ASCII characters, while
showing 'charset' for ASCII characters probably makes littles sense.
Of course, that's only my guess, the default behavior wrt this is pure
heuristics, so YMMV.
We could mention this exception in the manual.
This bug report was last modified 7 years and 4 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.