[comp.unix.questions] vi gobbles 8th bit

steve@geac.UUCP (Steve Lane) (08/17/88)

I have been using vi for years, and was glad to see that MKS provided it
for MS-DOS when I had to do an IBM PC-AT application recently.

However, I needed to edit files containing 8-bit characters, in order
to draw fancy boxes etc. When I edited these files with vi, it noted that
I had 264 non-ascii characters, but chopped them to 7 bits before saving
the changed file.

Is there any option in vi that maintains 8-bit data on exit that anyone
is aware of? It obviously recognizes that they're there! And I doubt
whether this "feature" is particular to MKS.

Any help would be appreciated (other than suggestions to RTFM which
happens to be 20 miles away). I'd prefer to stay with vi if possible --
it has served me well in the past.

Steve.
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Steve Lane,                        UUCP: ...[yunexus, utgpu]!geac!steve
Software Solutions                 (416) 221-2830
108-755 Steeles Ave W, Willowdale, Ontario, M2R 2S6.

mike@pcsbst.UUCP (Mike Schroeder) (08/24/88)

In article <3160@geac.UUCP> steve@geac.UUCP (Steve Lane) writes:
>
 [....]
>
>Is there any option in vi that maintains 8-bit data on exit that anyone
>is aware of? It obviously recognizes that they're there! And I doubt
>whether this "feature" is particular to MKS.
>

Well, AT&T's SV3.1 vi supports 8-bit character sets (all in
keeping with national language support). 

Must admit I don't know whether you can get it for your machine.

Mike Schroeder			(cochise!mike@pcsbst.UUCP)
PCS GmbH; Pfaelzer-Wald-Str. 36; D-8000 Muenchen 90; W. Germany
UUCP:  ...uunet!unido!pcsbst!msc
PS: anyone seen my disclaimer wandering around ?-)

wheels@mks.UUCP (Gerry Wheeler) (08/27/88)

In article <3160@geac.UUCP>, steve@geac.UUCP (Steve Lane) writes:
> I have been using vi for years, and was glad to see that MKS provided it
> for MS-DOS.
> 
> However, I needed to edit files containing 8-bit characters, in order
> to draw fancy boxes etc. When I edited these files with vi, it noted that
> I had 264 non-ascii characters, but chopped them to 7 bits before saving
> the changed file.

If you use the eightbits option, vi will not mash the bytes with the top
bit set.  Once you have done that, you can set the national and native
options to choose how you want to display these characters.  You
mentioned that you wanted to view the IBM PC line drawing characters, so
I suspect your best bet would be to set native. 

Once you find the settings you prefer, you can put the appropriate
command in your ex.rc file so vi will set them each time it starts.  It
looks for ex.rc in the current directory, then in your home directory if
you have $HOME set, or in the root directory if not. 
-- 
     Gerry Wheeler                           Phone: (519)884-2251
Mortice Kern Systems Inc.               UUCP: uunet!watmath!mks!wheels
   35 King St. North                             BIX: join mks
Waterloo, Ontario  N2J 2W9                  CompuServe: 73260,1043