From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe? Date: Tue, 20 Feb 2007 05:45:29 -0500 Message-ID: <45DAD149.8040200@speakeasy.net> References: <1171628373.417583.61410@k78g2000cwa.googlegroups.com> <87zm7e8e7j.fsf@wivenhoe.staff8.ul.ie> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1171968441 9451 80.91.229.12 (20 Feb 2007 10:47:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Feb 2007 10:47:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 20 11:46:23 2007 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.50) id 1HJSVq-0001sq-N3 for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Feb 2007 11:46:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HJSVq-0001Za-Ad for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Feb 2007 05:46:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HJSVd-0001ZV-J8 for help-gnu-emacs@gnu.org; Tue, 20 Feb 2007 05:46:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HJSVb-0001ZJ-5S for help-gnu-emacs@gnu.org; Tue, 20 Feb 2007 05:46:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HJSVa-0001ZG-Vh for help-gnu-emacs@gnu.org; Tue, 20 Feb 2007 05:46:07 -0500 Original-Received: from mail7.sea5.speakeasy.net ([69.17.117.9]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HJSVa-0000v9-FM for help-gnu-emacs@gnu.org; Tue, 20 Feb 2007 05:46:06 -0500 Original-Received: (qmail 32324 invoked from network); 20 Feb 2007 10:46:04 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO [192.168.0.27]) (gebser@[66.93.11.17]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 20 Feb 2007 10:46:04 -0000 User-Agent: Thunderbird 1.5.0.9 (X11/20061206) In-Reply-To: X-Enigmail-Version: 0.94.1.1 OpenPGP: id=45796D04 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:41346 Archived-At: On 02/19/2007 09:00 PM somebody named Stefan Monnier wrote: >> (replace-string "—" "--" nil (point-min) (point-max)) ; multi-byte > [...] >> Also, multi-byte strings such as the first should be toward >> the top of the list so that single-byte replacements don't >> cut them up, making subsequent searches for them impossible. > > Huh? There is no overlap between the single-char string "—" and the single > char strings like "\221". You can reorder them all you like. > > I'm not sure what you mean by "multi-byte", but it sounds like there might > be some confusion here. > > > Stefan When I copy-n-paste "—" into an emacs buffer, one of the (several) bytes displayed is represented by '\224'. I would assume that others will find the same. So then of course if I replace that byte, a subsequent search for "—" will fail... and leave behind the other garbage characters. Have you tried to copy-n-paste "—" into an emacs buffer? What do you get?