bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48029: 28.1; [native-comp] Function names with non-ascii characters


From: Eli Zaretskii
Subject: bug#48029: 28.1; [native-comp] Function names with non-ascii characters
Date: Fri, 08 Jul 2022 08:43:39 +0300

> From: Andrea Corallo <akrl@sdf.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 48029@debbugs.gnu.org,
>         jakanakaevangeli@chiru.no
> Date: Thu, 07 Jul 2022 20:51:48 +0000
> 
> We have the symbol `nonascii-test-žžž' correct into our pipeline.
> 
> Then we prepare the file that will be executed by the subprocess that
> will do the actual compilation, we do this in `comp-final'.
> 
> Here when we print `nonascii-test-žžž' using `prin1-to-string' this
> becomes "nonascii-test-\x017e\x017e\x017e" (exploring it with the
> debugger).
> 
> This is then stored in the temp file I mentioned, the file has on top
> ";; -*-coding: nil; -*- " and the symbol is shown as
> "nonascii-test-\305\276\305\276\305\276" if I visit it on my emacs.
> 
> Now two options, either we are not printing it as we should or either
> the reader doesn't know he has to handle these non ascii characters
> while reading back.
> 
> I'm no expert in this area, I guess will be evident to experts what we
> are not doing correctly here.

Why do we have ";; -*-coding: nil; -*- "?  I think that's the problem:
it should be ";; -*-coding: utf-8; -*- " instead.  Where does the nil
come from?

Lisp sources are by default UTF-8 encoded, so that should be the
default for the temp file we write.  Bonus points for using the actual
encoding of the Lisp source file there (which in very rare cases can
be something other than UTF-8).

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]