Date: Fri, 02 Jan 1998 10:56:15 +0100 From: "Jose M. Alcaide" <jose@we.lc.ehu.es> To: freebsd-questions@FreeBSD.ORG, pol@leissner.se, helbig@FreeBSD.ORG Subject: SOLVED: International characters in vi are displayed as hex? Message-ID: <34ACB9BF.935CB4C3@we.lc.ehu.es> References: <348FB609.AE23FC54@we.lc.ehu.es> <34A929D6.120E7590@we.lc.ehu.es>
next in thread | previous in thread | raw e-mail | index | archive | help
Jose M. Alcaide wrote: > > If compiled on FreeBSD, the call to setlocale() pass LC_ALL as > the first argument. I have tested this, and setlocale(LC_ALL,"") > works with most locales, but fails with a few ones: > > ascii > es_ES.ISO_8859-1 > fi_FI.ISO_8859-1 > ja_JP.EUC [also fails with setlocale(LC_CTYPE, "")] > ja_JP.SJIS [also fails with setlocale(LC_CTYPE, "")] > ko_KR.EUC [also fails with setlocale(LC_CTYPE, "")] > lt_LN.ASCII > lt_LN.ISO_8859-1 > lt_LN.ISO_8859-2 > nl_BE.ISO_8859-1 > sv_SE.ISO_8859-1 > us-ascii > > However, setlocale(LC_CTYPE, "") [_not_ LC_ALL] works fine with these > locales except the three noted. The vi problem is definitely solved. Indeed, the setlocale(LC_ALL,"") call in /usr/src/contrib/nvi/common/key.c fails because some locales are not fully described: Wolfgang Helbig wrote: > > That's because the file LC_TIME is missing in the directory > /usr/share/locale/es_ES.ISO_8859-1. If called with "LC_ALL", > setlocale(3) returns with an error ("No such file or directory") > without trying to load LC_CTYPE. > > So the fix is to provide a spanish LC_TIME file. You find sources > for other LC_TIME files in /usr/src/share/timedef/data. To build a > LC_TIME file from it's source, you only have to delete the comment > lines. This solution can be also applied to the other locales, such as sv_SE.ISO_8859-1. I have created the LC_TIME file for the spanish locale, and everything works fine now. Thanks Wolfgang! -- JM ----------------------------------------------------------------------- Jose M. Alcaide | mailto:jose@we.lc.ehu.es Universidad del Pais Vasco | http://www.we.lc.ehu.es/~jose Dpto. de Electricidad y Electronica | Facultad de Ciencias - Campus de Lejona | Tel.: +34-4-4647700 x2624 48940 Lejona (Vizcaya) - SPAIN | Fax: +34-4-4858139 ----------------------------------------------------------------------- "Go ahead... make my day." - H. Callahan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34ACB9BF.935CB4C3>