[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[h-e-w] Changing smart quotes into ordinary quotes
From: |
Tolkin, Steve |
Subject: |
[h-e-w] Changing smart quotes into ordinary quotes |
Date: |
Mon, 24 Nov 2008 18:59:02 -0500 |
Summary: There has been a change in how emacs handles a paste of text
that includes so-called smart quotes and other special characters. How
can I turn them into ordinary ASCII characters?
Details:
I am running GNU Emacs 22.3.1 on of 2008-09-96 on SOFT-MJASON. On
windows XP SP2. This used to work in emacs 21.
Sometimes a Microsoft Word document, Outlook email, or other programs
will use special characters outside the ASCII range to represent open
and close quotations marks, apostrophe, dash, etc.
I select the text that contains those characters.
In emacs version 21 when I pasted them into an emacs buffer they became
characters such as octal 223 and octal 224. Now they become these
characters.
Char: " (342396, #o1234574, #x5397c) (Open quotation mark)
Char: " (342397, #o1234575, #x5397d) (Close quotation mark)
#x53979 apostrophe
#x53973 dash
I have a macro that I found a while ago in
http://www.eskimo.com/~seldon/dotemacs.el that starts like this:
(defun hack-charset-netscape-to-oem (start end)
(interactive "r")
(save-excursion
(format-replace-strings '(
(In my actual _emacs init file there is a single character that displays
as \222 i.e. octal 222.
But in this email I typed it as 4 separate characters.)
I tried adding these 2 lines;
("\U0005397c" . "\"") ; open double quote
("\U0005397d" . "\"") ; close double quote
But they fail, saying, "unsupported Unicode code point U+5397c" for the
first line above.
(I found that format for Unicode characters in some emacs help.)
What am I doing wrong?
Is there a list of the common characters to replace with their near
ASCII equivalent?
Thanks,
Steve
--
Steven Tolkin
There is nothing so practical as a good theory. Comments are by me,
not Fidelity Investments, its subsidiaries or affiliates.
- [h-e-w] Changing smart quotes into ordinary quotes,
Tolkin, Steve <=