[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?
From: |
Stefan Monnier |
Subject: |
Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe? |
Date: |
Fri, 16 Feb 2007 11:22:17 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) |
> My apologies as I know this topic has been covered before, but despite
> much Googling I haven't found a simple, direct solution to the
> problem.
> I have just started seeing lots of nasty stuff like \222 instead of
> apostrophes in working on text files in Emacs on XP, then trying to
> reformat these files for LaTeX. My guess is I picked this garbage up
> when I copy-and-pasted some material out of Word, though I'm not
> certain. Emacs on XP displays these characters fine when I am just
> working with a .txt or .org file - which is why I didn't pick up on
> the problem earlier.
> I am looking for a simple function or .el package that will remove the
> garbage and replace it with latin1 encoding or whatever is acceptable
> to LaTeX. I have done lots of Googling but haven't come up with
> anything that doesn't refer to gnus (which I don't use) or which
> doesn't get me lost in talk of this encoding system or that. A search-
> and-replace function will do fine - and I will even write it myself if
> someone gives me a tip on how to get started (again, I'm not a lisp
> expert).
An alternative solution to the one you request might be to open the file
using the `windows-1252' coding-system rather than `latin-1'.
C-x RET c windows-1252 RET C-x C-f <thefile> RET
or if you have a recent Emacs, you can just revert the buffer with
a different coding system:
C-x RET r windows-1252 RET
-- Stefan
- Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?, (continued)
Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?, ken, 2007/02/19
Message not available
- Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?, Stefan Monnier, 2007/02/19
- Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?, ken, 2007/02/20
- Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?, Juanma Barranquero, 2007/02/20
- Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?, ken, 2007/02/20
- Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?, Juanma Barranquero, 2007/02/20
Message not available
Re: How to get rid of Microsoft dumb quotes, e.g. \222 for apostrophe?,
Stefan Monnier <=