[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48902: 28.0.50; Directory names containing apostrophes and backticks
From: |
Eli Zaretskii |
Subject: |
bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems |
Date: |
Tue, 08 Jun 2021 17:02:25 +0300 |
> Date: Tue, 8 Jun 2021 14:00:17 +0100
> From: Alan Third <alan@idiocy.org>
> Cc: larsi@gnus.org, naofumi@yasufuku.dev, 48902@debbugs.gnu.org,
> salutis@me.com
>
> > 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?)
>
> I think you're right. But confusingly initByReferencingFile takes an
> NSString which is a UTF-16 format string, so if I remove all the calls
> to ENCODE_FILE, stringWithLispString works fine.
>
> I guess we just need to make a note that stringWithLispString cannot
> handle UTF-8 encoded filenames, unless someone has a smarter solution.
If you do need a UTF-16 encoded string, then instead of ENCODE_FILE
you can call code_convert_string_norecord with Qutf_16. There's no
need to invent or use a private UTF-16 encoder there, and you also get
rid of an unnecessary extra UTF-8 encoding as a bonus.
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, (continued)
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Alan Third, 2021/06/08
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Mattias Engdegård, 2021/06/08
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Alan Third, 2021/06/08
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Mattias Engdegård, 2021/06/09
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Alan Third, 2021/06/09
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Rudolf Adamkovič, 2021/06/11
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Eli Zaretskii, 2021/06/09
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Mattias Engdegård, 2021/06/08
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Eli Zaretskii, 2021/06/08
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Alan Third, 2021/06/08
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems,
Eli Zaretskii <=
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Alan Third, 2021/06/08
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Eli Zaretskii, 2021/06/08
- bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems, Alan Third, 2021/06/08