[Tutor] Re: replace windows quote

Derrick 'dman' Hudson dman@dman.ddts.net
Sat Jan 11 18:54:03 2003


--WhfpMioaduB5tiZL
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jan 10, 2003 at 01:25:36PM +0100, Pietro Ciuffo wrote:
| Hi all.
| I have to replace - inside a text file - a quote inserted
| by Word X Windows with a simple plain quote.
| The problem is to match the 'Win' quote: if I open the file in vim, I
| see a '~R' blue sign, if I do cat -A, the output is a 'M-^R' sign.
| Anyone could help me?

The "win" quote is encoded with CP1252 (a Microsoft non-standard
character set).  I belive the value of the left quote is 0xb3 and the
right quote is 0xb2.  (they appear as superscript 3 and 2 in my
environment)

Try this in vim (or the equivalent in python) :
    :%s/=B3/'/g

(enter the "weird" character by typing ^Vxb3, ^V means hold control
and press v)

HTH,
-D

--=20
If anyone would come after me, he must deny himself and take up his
cross and follow me.  For whoever wants to save his life will lose it,
but whoever loses his life for me and for the gospel will save it.  What
good is it for a man to gain the whole world, yet forfeit his soul?  Or
what can a man give in exchange for his soul?
        Mark 8:34-37
=20
http://dman.ddts.net/~dman/

--WhfpMioaduB5tiZL
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj4grokACgkQO8l8XBKTpRSVQwCgoisoUUw3cZOAsWtJD7msrcBI
NocAoKSPnEAQ29yk0z+lIzx2Xk/wsWUr
=sik/
-----END PGP SIGNATURE-----

--WhfpMioaduB5tiZL--