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: Marcin Borkowski
Subject: Re: Is there a way to "asciify" a string?
Date: Thu, 07 Jun 2018 19:15:32 +0200
User-agent: mu4e 1.1.0; emacs 27.0.50

On 2018-06-03, at 00:33, Drew Adams <drew.adams@oracle.com> wrote:

>> My use case is much, much simpler than much of the stuff mentioned in
>> this thread.  99.5% (or more) of the cases are Polish names, where we
>> have only 9 "offending" letters, all easily asciified.  I thought there
>> is a simple, general solution (and I learned there isn't and probably
>> there can't be).
> ...
>> KISS
>
> If you want a really rudimentary, KISS solution along those
> lines, just apply a set of mappings of the chars you're
> interested in.
>
> I used that approach in the last millenium, in `unaccent.el'
> (and I still use it occasionally).
>
> I was interested only in translating letters with trema/umlaut,
> circumflex, grave & acute accents, cedilla, tilde, S-zed,
> guillemets, ae ligature, slashed O, angstrom, and upside-down
> question mark & exclamation point - so my translation alist
> contained only those mappings.  But you could using any
> mapping, just by redefining variable `reverse-iso-chars-alist'
> (not a good name, considering its generality, but that's what
> I was using it for).
>
> https://www.emacswiki.org/emacs/download/unaccent.el

Thanks, that's a good idea, although I was too lazy to perform all these
mappings myself and used the function mentioned earlier in the thread to
shave off all the accents.

Best,

-- 
Marcin Borkowski
http://mbork.pl



reply via email to

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