From: Eli Zaretskii <eliz@gnu.org>
To: Alan Third <alan@idiocy.org>
Cc: 48902@debbugs.gnu.org, larsi@gnus.org, salutis@me.com,
naofumi@yasufuku.dev
Subject: bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems
Date: Tue, 08 Jun 2021 15:37:51 +0300 [thread overview]
Message-ID: <834ke8fs68.fsf@gnu.org> (raw)
In-Reply-To: <YL9eyAcFsLc9pfKS@breton.holly.idiocy.org> (message from Alan Third on Tue, 8 Jun 2021 13:12:56 +0100)
> Date: Tue, 8 Jun 2021 13:12:56 +0100
> From: Alan Third <alan@idiocy.org>
> Cc: 48902@debbugs.gnu.org, Rudolf Adamkovič <salutis@me.com>,
> naofumi@yasufuku.dev
>
> On Tue, Jun 08, 2021 at 01:57:01PM +0200, Lars Ingebrigtsen wrote:
> > naofumi@yasufuku.dev <naofumi@yasufuku.dev> writes:
> >
> > > diff --git a/src/nsimage.m b/src/nsimage.m
> > > index fa81a41a51..8c7a3d9a09 100644
> > > --- a/src/nsimage.m
> > > +++ b/src/nsimage.m
> > > @@ -262,7 +262,7 @@ + (instancetype)allocInitFromFile: (Lisp_Object)file
> > > found = ENCODE_FILE (found);
> > >
> > > image = [[EmacsImage alloc] initByReferencingFile:
> > > - [NSString stringWithLispString: found]];
> > > + [NSString stringWithUTF8String: SSDATA (found)]];
> >
> > Hm... I'm not very familiar at all with the Objective C code here...
> > but shouldn't "found" here be a Lisp string so that stringWithLispString
> > would do the right thing?
>
> It's always possible that stringWithLispString isn't doing the right
> thing. It's implemented at nsfns.m:3026. I know almost nothing about
> UTF8/UTF16 so while it looks like it's doing the right thing to me, I
> could be entirely wrong.
It looks like stringWithLispString encodes into UTF-16? But file
names on macOS should be encoded in UTF-8, and in fact
allocInitFromFile already does TRT when it calls ENCODE_FILE, just
before stringWithLispString is called. So I think the patch is
correct.
(UTF-16 encoding on macOS is for ENCODE_SYSTEM, right?)
next prev parent reply other threads:[~2021-06-08 12:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 13:32 bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-07 14:08 ` Lars Ingebrigtsen
2021-06-07 14:15 ` Eli Zaretskii
2021-06-07 14:24 ` Lars Ingebrigtsen
2021-06-07 14:36 ` Eli Zaretskii
2021-06-07 14:13 ` Eli Zaretskii
2021-06-08 22:21 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-08 10:39 ` naofumi
2021-06-08 11:57 ` Lars Ingebrigtsen
2021-06-08 12:12 ` Alan Third
2021-06-08 12:14 ` Lars Ingebrigtsen
2021-06-08 17:45 ` Mattias Engdegård
2021-06-08 18:18 ` Eli Zaretskii
2021-06-08 19:13 ` naofumi
2021-06-08 20:08 ` Mattias Engdegård
2021-06-08 19:10 ` Alan Third
2021-06-08 19:52 ` Mattias Engdegård
2021-06-08 20:33 ` Alan Third
2021-06-09 11:40 ` Mattias Engdegård
2021-06-09 15:19 ` Alan Third
2021-06-11 22:09 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-09 11:56 ` Eli Zaretskii
2021-06-08 18:17 ` Mattias Engdegård
2021-06-08 12:37 ` Eli Zaretskii [this message]
2021-06-08 13:00 ` Alan Third
2021-06-08 14:02 ` Eli Zaretskii
2021-06-08 16:19 ` Alan Third
2021-06-08 18:09 ` Eli Zaretskii
2021-06-08 19:24 ` Alan Third
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834ke8fs68.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=48902@debbugs.gnu.org \
--cc=alan@idiocy.org \
--cc=larsi@gnus.org \
--cc=naofumi@yasufuku.dev \
--cc=salutis@me.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.