From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Is there a way to "asciify" a string? Date: Sun, 27 May 2018 09:36:45 +0200 Message-ID: <20180527073645.GB17354@tuxteam.de> References: <87zi0llisj.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1527406512 17754 195.159.176.226 (27 May 2018 07:35:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 27 May 2018 07:35:12 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 27 09:35:08 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMqCq-0004WP-53 for geh-help-gnu-emacs@m.gmane.org; Sun, 27 May 2018 09:35:08 +0200 Original-Received: from localhost ([::1]:51208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMqEx-0002ak-Bx for geh-help-gnu-emacs@m.gmane.org; Sun, 27 May 2018 03:37:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMqEU-0002ab-17 for help-gnu-emacs@gnu.org; Sun, 27 May 2018 03:36:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMqEQ-0001yK-T6 for help-gnu-emacs@gnu.org; Sun, 27 May 2018 03:36:50 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:54066) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMqEQ-0001xN-Md for help-gnu-emacs@gnu.org; Sun, 27 May 2018 03:36:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=w5KI+69GQeDRv1EEwzLcwH6gCzed1yMr7WhMhekBtPw=; b=HzOz1hcGwyaTZbMsVcCnMd+aVf+ztEGxXdjsCCakEOsjYabmuJ3DcCMA1N/KMmh1VQ71De6YFS+rM+9Jetz8N+Ns1ggGI8xcz6EOpY+aV4tBUdbBYTFUo3IOISZwXhTM2jMvsBwx8M9PhIYRmfkSX0EyyDUvO/KqVJdvKpzwNsFn4xEVsm9e+odcIUqSdy0EbuCdhZuFR9ea/lUSOHIceetjgtbnSGFrGytSk6aKnDntIGgAzpRVEoFlUfY3M9nQO/PnTSg1fZ1jlEh8RhExLRBRNq96HbAOdjmOFpCpMGkjX/l9Pjhm1YWSal39sOfh/PIEjCnEuAKvBAJ8yOYx3g==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1fMqEP-0004cR-3m for help-gnu-emacs@gnu.org; Sun, 27 May 2018 09:36:45 +0200 In-Reply-To: <87zi0llisj.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116865 Archived-At: -----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-----