From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Is there a way to "asciify" a string? Date: Sat, 2 Jun 2018 22:33:48 +0000 (UTC) Message-ID: <68db4874-d7c2-4f4c-837e-1f0db59de7fc@default> References: <87zi0llisj.fsf@mbork.pl> <20180527073645.GB17354@tuxteam.de> <87y3g5l1h0.fsf@mbork.pl> <871sdp2hah.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527978757 25602 195.159.176.226 (2 Jun 2018 22:32:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Jun 2018 22:32:37 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: Marcin Borkowski , John Mastro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 03 00:32:32 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 1fPF4V-0006Uz-VE for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Jun 2018 00:32:28 +0200 Original-Received: from localhost ([::1]:32960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPF6c-0002JW-GI for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Jun 2018 18:34:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPF60-0002JR-RO for help-gnu-emacs@gnu.org; Sat, 02 Jun 2018 18:34:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPF5v-0003vs-U5 for help-gnu-emacs@gnu.org; Sat, 02 Jun 2018 18:34:00 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:34026) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fPF5v-0003vm-Ks for help-gnu-emacs@gnu.org; Sat, 02 Jun 2018 18:33:55 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w52MV7aC007179; Sat, 2 Jun 2018 22:33:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=ooPXYD/6PNO+IYP8eQurhvhQ5TJSorH3jp7VMPCqO8k=; b=J7EXJCSwv8l/vPLdDVX3ayTul6Tb5Q1nrw4A5OFUxit8N6gVpOI/PIabLwNcjYeeQa6z lc/X+NktHFlqYW99AvTSIRAbh3epgbyvmp2ykyYxrflbmw8sfyiYP/USDrN6gXEpusL/ eNeVo3DIwphc15/4ZPzSL4IPjDb3fY8U/8Se9LKKhN8qf9gY+B+emKq0+kN1OPwDXdKL qgwT5ic2IMFmv7AW5O+8XdnkRFZL1lUKXMcdUTN1W5F1z/1/R1lkbGOnQktzt+uq3MLU 2HdxS2nAOpnXMOJ3Ct48WerBOi8tFAoeCjpAsdG6WX7bDH1TSAWmgeUl6DO5avI72eYh 1g== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2jbvyp8b0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 02 Jun 2018 22:33:52 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w52MXpAB017527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 2 Jun 2018 22:33:51 GMT Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w52MXpwp029461; Sat, 2 Jun 2018 22:33:51 GMT In-Reply-To: <871sdp2hah.fsf@mbork.pl> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8912 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=746 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806020264 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 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:116952 Archived-At: > 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