Re: Wie bringe ich dem xterm utf8 bei?
Andreas Pakulat <apaku@gmx.de> writes:
>On 12.Mai 2005 - 18:35:15, Helmut Waitzmann wrote:
>> Wie kommt man an die Liste der installierten locales? Ich habe mich bei
>> »locale -a« umgesehen. Ist »locale -a« nicht genau dafür vorgesehen?
>
>Jupp...
Anscheinend doch nicht:
>> »locale -a« kennt noch immer keine ».UTF-8«-Locales (wie schon zuvor
>> auch):
>>
>> $ locale -a
>> C
>> de_DE
>> de_DE@euro
>> de_DE.iso88591
>> de_DE.iso885915@euro
>> de_DE.utf8
>> de_DE.utf8@euro
>Bei mir auch nicht, allerdings zeigt locale -m (die Kodierungen, bzw.
>Character Maps) kein kleingeschriebenes utf8, sondern ebend UTF-8.
Willst Du damit sagen, »locale -m« sei eine verlässliche Quelle für
Kodierungsangaben, die man an den Namen eines Locales, durch einen ».«
getrennt, anhängen kann, unabhängig davon, ob »locale -a« dieses
zusammengeklebte Locale nennt? Etwa so:
canonical_locale ()
{
eval "`LC_ALL="$1" locale -k LC_CTYPE | \
sed -e '/^charmap=/ ! d'`"
locale="`printf '%s\n' "$1" | \
sed -e 's/\.[^@][^@]*//' \
-e '/@/ { s/\(@\)/.'"$charmap"'\&/; b; }' \
-e 's/$/.'"$charmap"'/' `"
printf '%s\n' "$locale"
}
Bei gewissen in »locale -m« enthaltenen Zeilen, z.B.
ANSI_X3.110-1983
ANSI_X3.4-1968
habe ich allerdings meine Zweifel:
$ LC_ALL="`canonical_locale C`" locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=C
LC_CTYPE="C.ANSI_X3.4-1968"
LC_NUMERIC="C.ANSI_X3.4-1968"
LC_TIME="C.ANSI_X3.4-1968"
LC_COLLATE="C.ANSI_X3.4-1968"
LC_MONETARY="C.ANSI_X3.4-1968"
LC_MESSAGES="C.ANSI_X3.4-1968"
LC_PAPER="C.ANSI_X3.4-1968"
LC_NAME="C.ANSI_X3.4-1968"
LC_ADDRESS="C.ANSI_X3.4-1968"
LC_TELEPHONE="C.ANSI_X3.4-1968"
LC_MEASUREMENT="C.ANSI_X3.4-1968"
LC_IDENTIFICATION="C.ANSI_X3.4-1968"
LC_ALL=C.ANSI_X3.4-1968
Also löst »locale -m« das Problem auch nicht.
Was tun?
--
Wenn Sie mir E-Mail schreiben, stellen | When writing me e-mail, please
Sie bitte vor meine E-Mail-Adresse | precede my e-mail address with
meinen Vor- und Nachnamen, etwa so: | my full name, like
Helmut Waitzmann <xxx@example.net>, (Helmut Waitzmann) xxx@example.net
Reply to: