From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Is there a way to "asciify" a string? Date: Fri, 01 Jun 2018 10:02:53 +0300 Message-ID: <837enjgfaa.fsf@gnu.org> References: <87zi0llisj.fsf@mbork.pl> <20180527073645.GB17354@tuxteam.de> <87y3g5l1h0.fsf@mbork.pl> <20180531192348.22baa2917129486248557378@speakeasy.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1527836491 11971 195.159.176.226 (1 Jun 2018 07:01:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Jun 2018 07:01:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 01 09:01:27 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOe3y-00030T-2x for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Jun 2018 09:01:26 +0200 Original-Received: from localhost ([::1]:47752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOe65-0000PR-09 for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Jun 2018 03:03:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOe5Q-0000PL-GA for help-gnu-emacs@gnu.org; Fri, 01 Jun 2018 03:02:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOe5N-0002DV-DY for help-gnu-emacs@gnu.org; Fri, 01 Jun 2018 03:02:56 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOe5N-0002DN-9y for help-gnu-emacs@gnu.org; Fri, 01 Jun 2018 03:02:53 -0400 Original-Received: from [176.228.60.248] (port=3764 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fOe5M-0007aU-O8 for help-gnu-emacs@gnu.org; Fri, 01 Jun 2018 03:02:53 -0400 In-reply-to: <20180531192348.22baa2917129486248557378@speakeasy.net> (jklowden@speakeasy.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116937 Archived-At: > From: "James K. Lowden" > 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.