help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Is there a way to "asciify" a string?


From: Eli Zaretskii
Subject: Re: Is there a way to "asciify" a string?
Date: Fri, 01 Jun 2018 10:02:53 +0300

> From: "James K. Lowden" <jklowden@speakeasy.net>
> Date: Thu, 31 May 2018 19:23:48 -0400
> 
> It's good advice, though treacherous.  If you use any encoding other
> than ASCII, you'll need to indicate the encoding used, and put up with
> recipients who don't know what "encoding" is, or can't re-encode the
> names to their machine's preferred encoding.  
> 
> For instance, if you send UTF-8, you can expect befuddlement from
> Windows users, whose system implicitly recognizes UTF-16LE.  

As Stefan points out, any reasonable application already knows how to
overcome this difficulty.  Emacs certainly does -- that's what the
various encodings it supports are about.  Using that, you can visit a
file names on a system where file names are UTF-8 encoded, then save
that file to a system whose file names are encoded in UTF-16LE.  All
that Emacs needs is for the user to tell it which encoding to use for
file names on what system.

> If Windows's filename rules were the actual constraint, the allowed
> characters in a Windows filename is well defined.

Yes, and the "prohibited" characters, while they are more numerous
than on Posix systems, are still very few (and are all below codepoint
127).  Any other non-ASCII character is allowed, be it inside the BMP
or outside it.

So it is quite possible nowadays to keep the original characters and
expect to be able to name files with them.



reply via email to

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