Re: How to view/edit EBCDIC file with VIM ?
- View Source
----- Original Message -----
From: "Masanori Watanabe" <mwatana2@...>
Sent: Friday, February 06, 2004 11:12 PM
Subject: How to view/edit EBCDIC file with VIM ?
> I'm trying to edit EBCDIC files(cp437) with VIM on
> How can I do this ?
> Masanori Watanabe
> 12345 Lamplight Village Ave. #428
> Austin,TX 78758
> Tel: 512-873-4902 Fax: 443-658-0369
> e-mail: mwatana2@...
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
Do you want EBCDIC or cp437? They are very different.
cp437 is the encoding that used to be the default on DOS before
codepage-switching came around; AFAIK it is still burned in the ROMS of
modern PCs. It is a variant of ASCII, very similar to latin1 or to cp850,
with a few differences in some of the upper-half characters (0x80 to 0xFF).
It has the space at 0x20, digits at 0x30-0x39, uppercase letters 0x41-0x5a,
lowercase 0x61-0x7A. You can edit it with most available versions of Vim.
EBCDIC is an encoding that originates with Hollerith-card machines. It is
not compatible with ASCII (ASCII originates with papertape machines, just
for the record). EBCDIC has the digits at 0xF0-0xF9, letters A-I at
0xC1-0xC9, J-R at 0xD1-0xD9, S-Z at 0xE2-0xE9 (IIRC). It has been quite some
time since I had any dealings with it, and at that time we didn't print
To edit EBCDIC with Vim, you need a version with +ebcdic compiled-in [i.e.
has("ebcdic")==1]. Most Windows versions, indeed most versions for any
computers whose native encoding is not EBCDIC, do not have that capability.