From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: how to scan file for non-ascii chars (eg cut-n-paste from ms-word) Date: Wed, 19 Jan 2011 06:38:41 +0200 Message-ID: <874o957bji.fsf@mithlond.arda> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1295411978 2103 80.91.229.12 (19 Jan 2011 04:39:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 Jan 2011 04:39:38 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: David Combs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 19 05:39:34 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PfPpU-0004n6-VG for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Jan 2011 05:39:33 +0100 Original-Received: from localhost ([127.0.0.1]:53085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfPpU-00067M-5z for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Jan 2011 23:39:32 -0500 Original-Received: from [140.186.70.92] (port=58681 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfPpB-00067E-Ne for help-gnu-emacs@gnu.org; Tue, 18 Jan 2011 23:39:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfPpA-0000lR-OV for help-gnu-emacs@gnu.org; Tue, 18 Jan 2011 23:39:13 -0500 Original-Received: from mta-out.inet.fi ([195.156.147.13]:59802 helo=kirsi1.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfPpA-0000k0-Cj for help-gnu-emacs@gnu.org; Tue, 18 Jan 2011 23:39:12 -0500 Original-Received: from mithlond.arda (84.251.132.215) by kirsi1.inet.fi (8.5.133) id 4D072CA7018BB3A5; Wed, 19 Jan 2011 06:39:03 +0200 Original-Received: from dtw by mithlond.arda with local (Exim 4.69) (envelope-from ) id 1PfPog-00011u-1U; Wed, 19 Jan 2011 06:38:42 +0200 In-Reply-To: (David Combs's message of "Tue, 18 Jan 2011 19:54:12 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78578 Archived-At: * 2011-01-18 19:54 (UTC), David Combs wrote: >>> What I'd like to do is change those "strange" characters to their >>> plain-ascii "equivalent", so to speak. Like '"' for double quote >>> (left OR right), etc. > What'd be nice is something that went through the whole buffer *once*, > doing the "right thing" with each non-ascii char. I don't know if Linux system's "iconv" utility is available in other operating systems but at least GNU/Linux users could do it with this: C-u M-x shell-command-on-region RET iconv -t ascii//translit RET with the region being the whole buffer. RET means key, in Emacs speak.