help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fixing M$ character codes


From: Haines Brown
Subject: Re: fixing M$ character codes
Date: Mon, 05 Jul 2004 10:00:21 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Jym Dyer <address@hidden> writes:

> =v= I think ideally the code would parse headers to figure out
> whether the brain damaged quotes are supposed to be ISO-Latin,
> Windows-1252, UTF-8, or whatever.  But for now I just use a
> sledgehammer and convert any and all needlessly-8bit characters
> to their 7bit equivalents.
> 
> =v= The code I use is below.  I suppose someday I ought to make
> them more comprehensive, but for now I just add what I need
> along the way.  (Warning:  this converts all know quotes and
> dashes to ASCII equivalents, but also convert centered dots to
> asterisks, which isn't exactly an equivalent.)
>     <_Jym_>
> 
> 
> (defun jym.de8 ()
>   "Turn 8bit characters into 7bit equivalents."
>   (interactive)
>   (mapcar
>    (function (lambda (old_and_new)
>     (save-excursion (apply 'query-replace old_and_new))))
>    '(("­" "-")
>      ("¹" "'")
> ...

Jym,

As on who often has to process documents with 8-bit characters, your
lisp code was certainly welcome. But it does not seem to do anything.

I'm running emacs 21.2.1 and pasted the code you supplied into
~/.emacs, and reloaded emacs. If I open a test file that is filled
with these 8-bit characters, it is displayed in emacs without any
change. 

What am I doing wrong? 

-- 
      Haines Brown
        


reply via email to

[Prev in Thread] Current Thread [Next in Thread]