From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: Is there a way to "asciify" a string? Date: Sun, 27 May 2018 19:59:23 +0300 Message-ID: <87sh6df310.fsf@iki.fi> References: <87zi0llisj.fsf@mbork.pl> <20180527073645.GB17354@tuxteam.de> <87y3g5l1h0.fsf@mbork.pl> <871sdxgt05.fsf@iki.fi> <83d0xh84kz.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1527440277 17038 195.159.176.226 (27 May 2018 16:57:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 27 May 2018 16:57:57 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: help-gnu-emacs To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 27 18:57:53 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 1fMyzO-0004Iq-So for geh-help-gnu-emacs@m.gmane.org; Sun, 27 May 2018 18:57:51 +0200 Original-Received: from localhost ([::1]:52684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMz1W-0006JH-2N for geh-help-gnu-emacs@m.gmane.org; Sun, 27 May 2018 13:00:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMz12-0006J6-TZ for help-gnu-emacs@gnu.org; Sun, 27 May 2018 12:59:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMz0z-0007ns-Qp for help-gnu-emacs@gnu.org; Sun, 27 May 2018 12:59:32 -0400 Original-Received: from mail.kapsi.fi ([2001:67c:1be8::25]:59945) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMz0z-0007km-EA; Sun, 27 May 2018 12:59:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=DWxd+6mYMuH9PmfKGtZbk9T+osTViCwEDcoEwf9da2Q=; b=P/n3ERJa0cDSCTa8uSJ4HMR4ltl6Eiyvl2o3hwpCJbwcwC4tADnYgTQG2V2nFOXfVCdsJ8CxUgEcX/smYepN9+UdezRfxlTFwkOXtzX4r/sNsq3jksTO6Ztr2IAKkUlpO1Fmmrrdyk1LIvGEMVZvVdnY0gg/bpTGo0nqBRvEQtILzOyt2uOUIpP8wgHZkMYxZgHeg6d0iQa0eYyEPtiRMPUPPJeQv/xumqeSqLgXuvTgoLqDdWEdiujjvY92jm7z29VrDdKjIl3gt7bXwDGwcMPzniZ5A1fjCa5UZ8VXM20Henh1+NM3sWfDSlZQb1AMkd/ykR4SQMPzFoGPxBhmFA==; Original-Received: from mobile-access-6df041-159.dhcp.inet.fi ([109.240.65.159] helo=mithlond) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fMz0w-0007l0-PF; Sun, 27 May 2018 19:59:26 +0300 In-Reply-To: <83d0xh84kz.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 May 2018 19:07:40 +0300") X-SA-Exim-Connect-IP: 109.240.65.159 X-SA-Exim-Mail-From: tlikonen@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:67c:1be8::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:116873 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii [2018-05-27 19:07:40+03] wrote: > Come on, crowd, you _must_ know that Emacs has all of the iconv's > functionality (and more) built-in, right? All that encode-coding stuff > etc.? Emacs has loads of stuff that I don't know or don't have time to study. :-) But thanks for your ucs-normalize hint. An ASCII normalization and filter could be something like this: (defun my-ascii-normalize-filter (string) (require 'cl-lib) (cl-remove-if (lambda (char) (> char 127)) (ucs-normalize-NFKD-string string))) Maybe one could want to filter out control chars too... =2D-=20 /// Teemu Likonen - .-.. // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 /// --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEkhZiiC54Bnj5a16Skzo1BB5+rVEFAlsK4+sACgkQkzo1BB5+ rVHcmwgApvXknLfx4R0tmRjovcVVk1IYHjHKN2LopWnuoXDS3tDpfRtoBWn654A2 R/+eZmb2QXxfbExPytFbXBDwctBEryYcJabfdYYoxdB8oXB1xOJ1zULAEufQKz6f ygBq/fj8dBx11RR8DQm4z55/X9MMb94U8mKZUjda1d5wuGMoZO6xXSAM142xqoiq cEPG8q373SojxKu7hTHIsXjuCg7bWVEImCdUdsBhe3bSC3gChirfwlkLXuJ8U55T VFOLi2njDDXGxlL3ul6S6QUGQXSku2nCH2c9JXoLwza85xWbYVaRqZ6mfg9LwwQj 60CqQivHqB4yo4egNsH3eb3z/mqtgA== =AdCq -----END PGP SIGNATURE----- --=-=-=--