emacs-devel
[Top][All Lists]
Advanced

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

Re: master 6011d39b6a: Fix drag-and-drop of files with multibyte filenam


From: Po Lu
Subject: Re: master 6011d39b6a: Fix drag-and-drop of files with multibyte filenames
Date: Sun, 05 Jun 2022 21:07:06 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> Yes.  Sorry, I forgot that the code was in Lisp, not C.
>
>> > If some program other than Emacs is the target of the drop, raw bytes
>> > produced from raw-text will not be meaningful for it.
>> 
>> Why not?  Aren't those bytes equivalent to a C string describing a file
>> name that can be passed to `open'?
>
> Not necessarily.  First, non-ASCII characters can be encoded in
> different ways, and the other program might not necessarily support
> more than just the locale's encoding.  And second, any characters to
> which Emacs gives codepoints beyond the Unicode codespace (something
> that is rare, but it does happen) will not be understood by the other
> programs at all, because their codepoints are completely private to
> Emacs.

[...]

> <Shrug> I guess that other code is also incorrect, and was never
> seriously tested with non-ASCII file names outside of UTF-8 locales.
> Try Emacs whose file-name-coding-system is iso-2022-jp or somesuch.

That makes sense now, yes.  Thanks.


reply via email to

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