[PLUG] stupid circumflex a from M$ Word cut-and-paste into vi

John Jason Jordan johnxj at comcast.net
Mon Dec 1 21:28:40 UTC 2008


On Mon, 1 Dec 2008 12:38:11 -0800
"Webb Sprague" <webb.sprague at gmail.com> dijo:

> (I am working in Portland today, so you are the LUG list of choice :) )
> 
> When I cut and paste text from Word into vi, I get gremlin characters,
> especially with quotes; the single quote gives me a "circumflex-a"
> like in "regionâs" which should be "region's".
> 
> How can I substitute all of these with 's///g'?  I can't figure out
> how to ctrl-v it or anything.  Googling "circumflex a vi" just gives
> me a bunch of junk.

Sounds like a codepage problem. 

Windows defaults to 8859-X, where X reflects the country. MacOSX
defaults to UTF-16. All Linux machines in my experience default to
UTF-8. 

If your Linux box has OpenOffice.org, KOffice, or Abiword, I recommend
opening (not pasting) in one them as an alternate step. In my
experience their Word import filters are clever enough to recognize the
codepage of the original document and adjust it as necessary. 

I'd also try just pasting into one of the word processor programs, but
use Paste Special (usually Ctrl-Shift-v instead of just Ctrl-v). 

I know zero about vi, but if it has a paste special option, that would
be my first attempt, using the word processor programs as
intermediaries only if necessary.



More information about the PLUG mailing list