[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bulk replacement on region, buffer, file?
From: |
Bob Proulx |
Subject: |
Re: bulk replacement on region, buffer, file? |
Date: |
Thu, 10 Dec 2015 09:40:37 -0700 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Tom Roche wrote:
> I would appreciate pointers to code that enables "bulk replacement"
> of numerous string tuples ({to-replace, replace-with}) in a single
> call. What I mean, why I ask:
To handle the UTF-8 translations I like 'iconv'. It handles many
different types of transliterations.
$ echo '“foo”' | iconv -f UTF-8 -t ASCII//TRANSLIT
"foo"
If it were me I would do a first pass using iconv to transliterate
characters in the first pass and then perform the other replacements
you want in a second pass.
Bob