From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#48029: 28.1; [native-comp] Function names with non-ascii characters Date: Thu, 07 Jul 2022 20:51:48 +0000 Message-ID: References: <877dkp2zr6.fsf@miha-pc> <874kfliksx.fsf@gnus.org> <87bkua8fga.fsf@gnus.org> <8335fh9lah.fsf@gnu.org> <87bku0g6h7.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40308"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , 48029@debbugs.gnu.org, jakanakaevangeli@chiru.no To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 07 22:52:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9YTq-000AEo-Vc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Jul 2022 22:52:10 +0200 Original-Received: from localhost ([::1]:53432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9YTp-0003hC-8X for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Jul 2022 16:52:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9YTi-0003gp-Nx for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2022 16:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9YTi-0006pm-D8 for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2022 16:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o9YTi-0004ih-8j for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2022 16:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jul 2022 20:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48029 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 48029-submit@debbugs.gnu.org id=B48029.165722711518129 (code B ref 48029); Thu, 07 Jul 2022 20:52:02 +0000 Original-Received: (at 48029) by debbugs.gnu.org; 7 Jul 2022 20:51:55 +0000 Original-Received: from localhost ([127.0.0.1]:58116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9YTa-0004iL-KW for submit@debbugs.gnu.org; Thu, 07 Jul 2022 16:51:54 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:63997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9YTY-0004i9-8T for 48029@debbugs.gnu.org; Thu, 07 Jul 2022 16:51:53 -0400 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 267KplSi005152 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 7 Jul 2022 20:51:47 GMT In-Reply-To: <87bku0g6h7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 07 Jul 2022 19:47:32 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236418 Archived-At: Lars Ingebrigtsen writes: > Andrea Corallo writes: > >>>> >>>> Visit it and M-x emacs-lisp-native-compile-and-load. >>>> >>>> A function called "nonascii-test-=C3=85=C2=BE=C3=85=C2=BE=C3=85= =C2=BE" 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-=C3=85=C2=BE=C3=85=C2=BE=C3=85=C2= =BE" instead of > "nonascii-test-=C5=BE=C5=BE=C5=BE". Ah that's a very good point! Okay I had a look: We have the symbol `nonascii-test-=C5=BE=C5=BE=C5=BE' correct into our pipe= line. 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-=C5=BE=C5=BE=C5=BE' using `prin1-to-strin= g' 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