Subject: bug#31376: 26.0.50; print-charset-text-property not honored

From: Noam Postavsky <[email-masked]>
Date: Sun, 13 May 2018 14:29:58 -0400

Eli Zaretskii <[email-masked]> writes:

> This LGTM, but the description of 'default' IMO is too
> implementation-centric, which doesn't help the user in understanding
> what to expect from that value.  How about the variant below?

Yeah, I only understand it from the implementation myself.

>   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?

    (char-charset ?a) ;=> ascii
    (prin1-to-string
     (propertize (string ?a) 'charset 'chinese-cns11643-15))
    ;=> "\"a\""

vs

    (char-charset ?\xf6) ;=> unicode
    (prin1-to-string
     (propertize (string ?\xf6) 'charset 'chinese-cns11643-15))
    ;=> "#(\"ö\" 0 1 (charset chinese-cns11643-15))"

(Nothing special about chinese-cns11643-15, by the way, it's just the
first element in charset-list.)