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: tomas
Subject: Re: Is there a way to "asciify" a string?
Date: Mon, 28 May 2018 12:39:06 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

-----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 <p.stephani2@gmail.com> wrote:
> 
> > Marcin Borkowski <mbork@mbork.pl> 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-----



reply via email to

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