From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Is there a way to "asciify" a string? Date: Wed, 30 May 2018 12:12:53 +0200 Message-ID: <877enlcuze.fsf@mbork.pl> References: <87zi0llisj.fsf@mbork.pl> <20180527073645.GB17354@tuxteam.de> <87y3g5l1h0.fsf@mbork.pl> <87r2lwkrbe.fsf@mbork.pl> <20180528103906.GB18767@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527675158 29364 195.159.176.226 (30 May 2018 10:12:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 May 2018 10:12:38 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 30 12:12:34 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 1fNy5q-0007YV-4S for geh-help-gnu-emacs@m.gmane.org; Wed, 30 May 2018 12:12:34 +0200 Original-Received: from localhost ([::1]:37393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNy7x-0000Sj-1c for geh-help-gnu-emacs@m.gmane.org; Wed, 30 May 2018 06:14:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNy7L-0000RB-PU for help-gnu-emacs@gnu.org; Wed, 30 May 2018 06:14:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNy7I-0000fn-Ko for help-gnu-emacs@gnu.org; Wed, 30 May 2018 06:14:07 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:39831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNy7I-0000fb-Dx for help-gnu-emacs@gnu.org; Wed, 30 May 2018 06:14:04 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 89F81E6D84; Wed, 30 May 2018 12:14:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o8gzahw8HHhZ; Wed, 30 May 2018 12:13:57 +0200 (CEST) Original-Received: from localhost (188.47.47.7.ipv4.supernova.orange.pl [188.47.47.7]) by mail.mojserwer.eu (Postfix) with ESMTPSA id D6DF0E68AF; Wed, 30 May 2018 12:13:56 +0200 (CEST) In-reply-to: <20180528103906.GB18767@tuxteam.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 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:116900 Archived-At: On 2018-05-28, at 12:39, tomas@tuxteam.de wrote: > -----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 .-) Very interesting (though not acceptable in my use-case). Thanks, though! -- Marcin Borkowski http://mbork.pl