all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Haines Brown <brownh@teufel.hartford-hwp.com>
Subject: Re: fixing M$ character codes
Date: Mon, 05 Jul 2004 10:00:21 GMT	[thread overview]
Message-ID: <874qomvkpy.fsf@teufel.hartford-hwp.com> (raw)
In-Reply-To: Jym.wzzn6fx3t9.fsf@econet.org

Jym Dyer <jym@econet.org> 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	other threads:[~2004-07-05 10:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-03 16:00 fixing M$ character codes nospam55
     [not found] ` <Jym.wzfz884ct0.fsf@econet.org>
2004-07-04 13:19   ` nospam55
2004-07-04 14:08 ` Jym Dyer
2004-07-05 10:00   ` Haines Brown [this message]
2004-07-05 10:19     ` Thomas Gehrlein
2004-07-07 15:12     ` Jym Dyer
2004-07-07 20:38       ` Haines Brown
2004-07-15 16:59         ` Jym Dyer
2004-07-04 21:06 ` Jesper Harder
2004-07-05 14:22 ` nospam55

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874qomvkpy.fsf@teufel.hartford-hwp.com \
    --to=brownh@teufel.hartford-hwp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.