From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: Is there a way to "asciify" a string? Date: Mon, 28 May 2018 12:39:06 +0200 Message-ID: <20180528103906.GB18767@tuxteam.de> References: <87zi0llisj.fsf@mbork.pl> <20180527073645.GB17354@tuxteam.de> <87y3g5l1h0.fsf@mbork.pl> <87r2lwkrbe.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1527503864 29028 195.159.176.226 (28 May 2018 10:37:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 28 May 2018 10:37:44 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 28 12:37:40 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 1fNFX1-0007T6-H3 for geh-help-gnu-emacs@m.gmane.org; Mon, 28 May 2018 12:37:39 +0200 Original-Received: from localhost ([::1]:55177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNFZ8-0000UC-FH for geh-help-gnu-emacs@m.gmane.org; Mon, 28 May 2018 06:39:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNFYb-0000Tv-Dq for help-gnu-emacs@gnu.org; Mon, 28 May 2018 06:39:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNFYY-0001BQ-AC for help-gnu-emacs@gnu.org; Mon, 28 May 2018 06:39:17 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:57347) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNFYX-0001A9-WE for help-gnu-emacs@gnu.org; Mon, 28 May 2018 06:39:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=0DqU8+JpHT5zm8sMH4qQVBhM+kxtEfD3y7ZeUmatAWk=; b=W1t8wF8/YAF3QRY37bqNaROdkckvbA9fDNWovbOLJAhWLjabQscy+b+xYF53Z0yhU1EQ7d33eXtPW5/XsTD+SltmvQEzKmZ827vgHgCzhyAUhsCfgxJw6caHnqN77G9BGtdZHJOMjqpOBHZ80ljff4U9IJdrvFpHJP5gmkyUJeeSO2gYEsGBYoNDaYifAf8jhZ5T7P2CbBrU+NdTkQsI3eJS/WzGcRI6A0WuGUqicjwuAH8QFfO2LKGsBUN2SeqJ2tNW49hsRSjXolWFbRqVazwizXehYO6WZLwZNe418Kg6nR+PV3QVV2mL3xtWH8uZ7U5iBZg791UyhBbPkJ+VbA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1fNFYQ-0006Ls-2X for help-gnu-emacs@gnu.org; Mon, 28 May 2018 12:39:06 +0200 In-Reply-To: <87r2lwkrbe.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 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:116880 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, May 28, 2018 at 12:28:05PM +0200, Marcin Borkowski wrote: > > On 2018-05-28, at 10:15, Philipp Stephani wrote: > > > Marcin Borkowski schrieb am So., 27. Mai 2018 um 14:38 Uhr: > > > >> I understand that. > >> > >> Still, I need something *simple*. I have a person's name (possibly with > >> some national characters), and I want to derive a filename from it [...] > That's an interesting idea. However, I disagree. My idea is to have > a number (because that helps to keep some order, and there may be - and > sometimes are - more than one item relating to the same person), but > a name is _very_ helpful for menomic reasons. One often-used method is to just URL-encode [1] the thing. On the plus side, it's always ASCII and you have a "lossless" mapping back and forth, on the down side you lose lexicographic order and (some) readability (although we trained rats have already learnt to cope with %3D and %2F) Emacs supports that with the pair of functions `url-hexify-string' and `url-unhex-string' (see, Eli? Sometimes even /me finds something .-) Cheers - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlsL3EkACgkQBcgs9XrR2kb2yACfRq604m3nZ+s795yc8amNLG7I QsgAn16wDP1ywyjRoBsniO40qBftwxgv =8nAO -----END PGP SIGNATURE-----