Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jan 2002 11:31:02 +0200
From:      Richard =?utf-8?B?xIxlcGFz?= <rch@richard.eu.org>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: utf-8 locales in freebsd ?
Message-ID:  <20020119093102.GO77146@richard.eu.org>
In-Reply-To: <20020119063710.GA2750@foo31-249.visit.se>
References:  <20020119063710.GA2750@foo31-249.visit.se>

next in thread | previous in thread | raw e-mail | index | archive | help

--Qxx1br4bt0+wmkIi
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

On Sat Jan 19 07:37:11 2002 +0100 Martin Karlsson wrote:

>Hi list. Is there such a thing as UTF-8 locales for freebsd?
>
>I have utf fonts, but, changing my LC_CTYPE from sv_SE.DIS_8859-15 to
>sv_SE.UTF-8 doesn't seem to do what I want; it results in me no longer
>being able to type Swedish national chars.
>
>Anyone know about this?
>
        Hi,

You need to do something like this using your locale name, LOCALEDIR is /usr/share/locale:
install -d ${LOCALEDIR}/lt_LT.UTF-8/
ln -fs ../la_LN.ASCII/LC_COLLATE ${LOCALEDIR}/lt_LT.UTF-8/LC_COLLATE
mklocale -o ${LOCALEDIR}/lt_LT.UTF-8/LC_CTYPE attached_file/lt_LT.UTF-8.src
grep -v '^#' <your_date_definition_file_converted_with_iconv_to_utf-8_lt_LT.UTF-8.src.new >${LOCALEDIR}/lt_LT.UTF-8/LC_TIME

Making 0x80 - 0x9F characters printable probably is not needed, but I'm not sure.
This doesn't add complete wchar functions set, but most programs do not require this.  It works with xterm, KDE (after editing ~/.kde/share/config/kdeglobals & ~/.kde/share/config/kxkbrc), vim 6, gimp, mozilla (after editing /usr/X11R6/lib/mozilla/res/unixcharset.properties).
It's a pity most unices have utf-8 locales out of the box but not *BSD.

-- 
      ☻ Ričardas Čepas ☺
http://unicode.richard.eu.org/me/rch/ll.html

--Qxx1br4bt0+wmkIi
Content-Type: application/x-wais-source
Content-Disposition: attachment; filename="lt_LT.UTF-8.src"
Content-Transfer-Encoding: quoted-printable

/*=0A * LOCALE_CTYPE for the UTF-8 Locale=0A *=0A *	$Id: lt_LT.UTF-8.src,v =
1.0 1998/07/23 15:21:39 rch Exp $=0A */=0A=0AENCODING	"UTF2"=0AVARIABLE    =
    ISO 10646 character set=0A=0A#=0A# This is a comment=0A#=0AALPHA		'A' -=
 'Z' 'a' - 'z' =0ACONTROL		0x00 - 0x1f 0x7f=0ADIGIT		'0' - '9'=0AGRAPH		0x2=
1 - 0x7e 0x80 - 0xffff=0ALOWER		'a' - 'z' =0APUNCT		0x21 - 0x2f 0x3a - 0x40=
 0x5b - 0x60 0x7b - 0x7e =0A		0xa4 0xa7 0xa8 0xad 0xaf 0xb0 0xb2 0xb4 0x2c7=
 0xb8=0A		0xd7 0xf7 0x2d9 0x2010 -0x2044=0ASPACE		0x09 - 0x0d 0x20 0xa0 0x2=
002 - 0x2006 0x2009 0x200a=0AUPPER		'A' - 'Z' =0AXDIGIT		'a' - 'f' 'A' - 'F=
'=0ABLANK		' ' '\t' 0xa0=0APRINT		0x20 - 0x7e 0xa0 - 0xffff=0A# IDEOGRAM=0A=
# SPECIAL=0A# PHONEGRAM=0A=0AMAPLOWER       	<'A' - 'Z' : 'a'>=0AMAPLOWER  =
     	<'a' - 'z' : 'a'>=0AMAPUPPER       	<'A' - 'Z' : 'A'>=0AMAPUPPER     =
  	<'a' - 'z' : 'A'>=0ATODIGIT       	<'0' - '9' : 0>=0ATODIGIT       	<'A'=
 - 'F' : 10>=0ATODIGIT       	<'a' - 'f' : 10>=0A
--Qxx1br4bt0+wmkIi--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020119093102.GO77146>