[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: national to ASCII character conversion
From: |
Drew Adams |
Subject: |
RE: national to ASCII character conversion |
Date: |
Wed, 17 Jun 2009 13:56:17 -0700 |
> I have a string which contains national characters and I would like to
> convert them to ASCII equivalents. for example: ó -> o ł -> l ż -> z
>
> one of ways is just using: (replace-regexp-in-string "ó" "o" my_string)
> for each national character, but I believe that there is much better way.
I'm sure there is is a good way, but I don't know it. (I don't use such chars
much anymore.)
If someone doesn't offer a good way (which I doubt), then you can at least do
what I used to do:
http://www.emacswiki.org/emacs/unaccent.el.
If there is no good way currently (which I also doubt), then perhaps someone
will code something up.
When I used to do this a lot, I found it handy to have commands that do it for
one or more words (`unaccent-word') and for the region (`unaccent-region'). I
bind those to M-" and C-x ", respectively.