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

From: Helmut Eller <[email-masked]>
Date: Mon, 07 May 2018 20:08:19 +0200

On Mon, May 07 2018, Noam Postavsky wrote:

> Helmut Eller <[email-masked]> writes:
>
>> On Mon, May 07 2018, Andreas Schwab wrote:
>>
>>>> In GNU Emacs 26.0.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
>>>>  of 2017-08-15 built on caladan
>>>
>>> Worksforme.  Have you tried a current version?
>>
>> Same (wrong) result with the current version.  Maybe it's an issue with
>> environment settings?
>
> I can reproduce this.  I see something about
> PRINT_STRING_UNSAFE_CHARSET_FOUND in print.c, so I guess iso-8859-1 is
> considered "unsafe"?

Apparently which charsets are unsafe depends on the current locale.

If I start Emacs with LANG=it_IT.UTF-8 emacs -Q, then the charset
property is not printed.  Even though that locale is not installed and
this warning is printed at startup:

(process:23336): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.

With LANG=en_US.UTF-8 emacs -Q the problem is the same as for
LANG=C.UTF-8.

Maybe this dependency on the current locale is useful, but the docstring
of print-charset-text-property should probably mention it.

Helmut