[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: |
Sun, 27 May 2018 09:36:45 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, May 27, 2018 at 08:22:20AM +0200, Marcin Borkowski wrote:
> Hi all,
>
> I want to convert e.g. "żółć" to "zolc", or "Poincaré" to "Poincare"
> etc. IOW, I want to replace all these funny Unicode accented characters
> with their ASCII equivalents.
>
> Is there anything for that in Emacs?
I haven't an answer to your direct question, just a warning: without a
language context, you can't do it "correctly". For one illustrative
example, in German "ü" -> "ue", but in Spanish "ü" -> "u" (those diaereses
do have different functions in those languages). Transliterating "ü" with
just "u" in German would be wrong (but the reader might make some sense
of it), transliterating "ü" with "ue" in Spanish would not only be wrong,
but would almost certainly throw off the reader's auto-correction feature
(unles (s)he knows German and can recall that association).
I'm sure there are tons of other examples like that.
Heck, even up- and downcasing is strictly language context dependent
(witness the Turkish dotless I).
Sigh :-)
Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlsKYA0ACgkQBcgs9XrR2kaEowCfWl/QI+IFq4bt1J9uvTs9HGhW
FOcAn0LaWKiQ7xK7/85R+CaDr9hl0lfP
=eVFI
-----END PGP SIGNATURE-----
- Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/27
- Re: Is there a way to "asciify" a string?,
tomas <=
- Re: Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/27
- Re: Is there a way to "asciify" a string?, Teemu Likonen, 2018/05/27
- Re: Is there a way to "asciify" a string?, Eli Zaretskii, 2018/05/27
- Re: Is there a way to "asciify" a string?, Teemu Likonen, 2018/05/27
- Re: Is there a way to "asciify" a string?, Tak Kunihiro, 2018/05/28
- Re: Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/30
- Re: Is there a way to "asciify" a string?, Eli Zaretskii, 2018/05/30
- Re: Is there a way to "asciify" a string?, Marcin Borkowski, 2018/05/30
- Re: Is there a way to "asciify" a string?, tomas, 2018/05/27
- Re: Is there a way to "asciify" a string?, Eli Zaretskii, 2018/05/28