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: Andrea Corallo
Subject: bug#48029: 28.1; [native-comp] Function names with non-ascii characters
Date: Thu, 07 Jul 2022 20:51:48 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Andrea Corallo <akrl@sdf.org> writes:
>
>>>> >>>> Visit it and M-x emacs-lisp-native-compile-and-load.
>>>> >>>> A function called "nonascii-test-žžž" will be defined.
>
> [...]
>
>> the place where the C function name is generated is `comp-c-func-name'
>> at comp.el:1175.
>>
>> ATM I'm not 100% sure the fix limited to this tho.
>
> This isn't about the C function name, though -- the problem is that the
> Emacs function name is "nonascii-test-žžž" instead of
> "nonascii-test-žžž".

Ah that's a very good point!  Okay I had a look:

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.

Thanks!

  Andrea





reply via email to

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