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

No Subject



On Wed, 2004-04-07 at 22:03, Mark Thurman wrote:
> After the meeting, I went home and looked in vims help (usr_27.txt i
> think) and got to wondering, have you tried
> %s/5C/whatever
> obviously changing for whatever the hex is?
>
> --Mark
>
> > OK. Extra credit time here... I have several ostensibly text documents
> > that, when opened with vim, are littered with blue <92> sequences where
> > single quote (apostrophe) characters should be. (There are others
> > besides <92>, but if I can fix one I can fix them all.) I'll assume that
> > 92 is the ASCII decimal code for the single quote character.
> >
> > How does one designate a compound representation for a single character,
> > such as vim's <92>, a find & replace statement? Hint: specifying the
> > target as \<92\> does not work.

The detail I'm looking for is the exact syntax for finding characters
using their hexadecimal representations. The <92> character appears as
92 in a hexedit dump of the file.

The following forms do _not_ work, but they illustrate some of the forms
I've tried:

:%s/\x92/'/g
:%s/\0x92/'/g
:%s/\/0x92/'/g
:%s/x92/'/g

In each case VIM responds with an E486: Pattern not found: error.

If there are any true obsessive-compulsives out there who like real
challenges, I'm attaching a test file that contains the hex characters
0x92, 0x93, and 0x94 in place of the apostrophe (') and opening & closing
double quotes.

--Doc

This is a test. It’s a test of the “special” characters that VIM sometimes displays.




-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.