Path: utzoo!attcan!uunet!mcvax!unido!ecrcvax!diomidis From: diomidis@ecrcvax.UUCP (Diomidis Spinellis) Newsgroups: comp.editors Subject: Re: Can "vi" handle chars above 127 ASCII? Summary: Vi can not handle chars above 127 ASCII Keywords: vi ascii 8 bit character set Message-ID: <739@ecrcvax.UUCP> Date: 18 Jun 89 16:02:35 GMT References: <18473@unix.cis.pittsburgh.edu> Reply-To: diomidis@ecrcvax.UUCP (Diomidis Spinellis) Organization: ECRC, Munich 81, West Germany Lines: 33 In article <18473@unix.cis.pittsburgh.edu> dcarson@unix.cis.pittsburgh.edu (David Carson) writes: >I work on a Sun 3/50 and have a font which is bilingual in nature. >The low order characters (the normal 7-bit ASCII chars) are English >and the high order chars (top bit set) are Greek. Therefore, I should be >able to switch nicely between the two without having to change fonts. >[...] >Does anyone know how to set up "vi" >so that it can handle a file that contains chars with the 8th bit >set as an ASCII file. (By default, "vi" calls >this a non-ASCII file, and therefore it cannot be edited.) Many versions of vi check the magic number (the first two bytes in the file) before reading the file. One of the checks performed is to see if any of those first two characters has the high bit set. If this is the case the error ``Non-ascii file'' is reported. Even if you succeeded in making vi read such a file you would still have the problem of displaying it and entering characters. On a last count vi had a hard coded mask for the lower 7 bits in at least 46 different places. Thus using it or modifying it for an 8 bit character set is not trivial. I think the next (or the following ones) major releases of SunOS and System V are supposed (among other things) to fully support 8 bit character sets. >I don't think I'm quite ready to be converted to another editor >yet, though soon I will be (when I finish my master's). Do >other editors allow editing of such files? Emacs (as one would expect) does. Diomidis -- Diomidis Spinellis European Computer-Industry Research Centre (ECRC) Arabellastrasse 17, D-8000 Muenchen 81, West Germany +49 (89) 92699199 USA: diomidis%ecrcvax.uucp@pyramid.pyramid.com ...!pyramid!ecrcvax!diomidis Europe: diomidis@ecrcvax.uucp ...!unido!ecrcvax!diomidis