Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.editors Subject: Re: understanding vi Keywords: vi ex 8bit international Message-ID: <2796@auspex.auspex.com> Date: 5 Jan 90 21:45:54 GMT References: <1076@maxim.erbe.se> Organization: Auspex Systems, Santa Clara Lines: 32 > Hi, I am confused about vi's 8bit capability. > I was using vi on a vt230 with a Danish keyboard, and get > (octal code) displayed when I type one of the danish national characters. > Is there a way to make it understand that this is indeed a printable > national character and have it returned without turning it into > gobbledygook ? > >Not as far as I know, at least not in SysV R3.1. But as soon as you >hit Return or Escape, the octal gobbledygook should become the real >8-bit characters. Sounds like the symptoms I saw when bringing up the S5R3.1 "vi" for SunOS 4.1, which I was doing precisely because it *could* handle 8-bit characters.... The problem turned out to be either that 1) it hadn't yet been modified to use the ANSI C "setlocale" routine (AT&T invented their own internationalization routines for S5R3.1, we used the ANSI C interfaces instead) or 2) I hadn't set LANG or set up a default language to pick the ISO Latin #1 character set. 1) wouldn't apply on a vanilla S5 system, so I suspect the problem is 2); you have to set CHRCLASS to refer to a file specifying the settings for the CTYPE(3C) macros for ISO Latin #1 - the default is ASCII, and S5R3.1 seems to supply *only* a file for ASCII, not for ISO Latin #1 (I had to make up such a file for SunOS 4.1). Unfortunately, since they don't, in fact, supply such a file in S5R3.1, you may have to make one up yourself and compile it using the "chrtbl" utility (which I *hope* they documented), and then point CHRCLASS at it. Various of their national language environments for European countries may come with such a file, but I don't know if they have a Danish version....