Puppy 4.3(.x) has got these entries in /etc/profile :
#this line gets edited by chooselocale script...
#LANG=en_US.utf8 w004 going back to non-utf8...
LANG=en_US
export LANG
#v426 recommended by MU, avoid crashing for non-English locales on some apps...
export LC_COLLATE=en_US
in the dl pup-43x.sfs archive .
My current entries look(ed) like that :
#this line gets edited by chooselocale script...
#LANG=
de_DE@euro.utf8 w004 going back to non-utf8...
LANG=de_DE@euro
export LANG
#LCs=`locale`
LCs=`locale |tr -d '"'`
for loc in $LCs;do export $loc;done
#v426 recommended by MU, avoid crashing for non-English locales on some apps...
export LC_COLLATE=en_US
Now I prepare the console the same way :
bash-3.00# LANG=de_DE@euro
bash-3.00# export LANG
bash-3.00# LCs=`locale |tr -d '"'`
bash-3.00# for loc in $LCs;do export $loc;done
bash-3.00# export LC_COLLATE=en_US
Now i check :
bash-3.00#
LANG=de_DE@euro
LC_CTYPE=de_DE@euro
LC_NUMERIC=de_DE@euro
LC_TIME=de_DE@euro
LC_COLLATE=en_US
LC_MONETARY=de_DE@euro
LC_MESSAGES=de_DE@euro
LC_PAPER=de_DE@euro
LC_NAME=de_DE@euro
LC_ADDRESS=de_DE@euro
LC_TELEPHONE=de_DE@euro
LC_MEASUREMENT=de_DE@euro
LC_IDENTIFICATION=de_DE@euro
LC_ALL=
bash-3.00#
NOTE: LC_ALL is unset ...
When i start ffconvert in the console with an added locale command I get :
bash-3.00# /mnt/sda3/root/Downloads/pup.d/PEOPLE/shinobar/ffconvert-1.2.1/usr/bin/ffconvert-1.2.1
LANG=de_DE@euro
LC_CTYPE=de_DE@euro
LC_NUMERIC=de_DE@euro
LC_TIME=de_DE@euro
LC_COLLATE=de_DE@euro
LC_MONETARY=de_DE@euro
LC_MESSAGES=de_DE@euro
LC_PAPER=de_DE@euro
LC_NAME=de_DE@euro
LC_ADDRESS=de_DE@euro
LC_TELEPHONE=de_DE@euro
LC_MEASUREMENT=de_DE@euro
LC_IDENTIFICATION=de_DE@euro
LC_ALL=
RESULT:
1) simple sed [a-z] does not work ,
it works with "LC_COLLATE=C" pre_env AND "LC_ALL=C"
2) Few garbled Characters in the fronend/Gui i call "de_DE@euro-woLC_ALL"
3) and a lot of warnings when i move the mouse over the gui like :
(gtkdialog3:25237): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
(gtkdialog3:25237): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 16: Invalid UTF-8 encoded text - not valid 'Gib zus??tzliche Optionen f? 1/4 r das Videofromat an'
NOTE : The directories in /usr/lib/locale are there with their names and with their contents .
Now tried de_DE.utf8:
bash-3.00# LANG=de_DE.utf8
bash-3.00# LCs=`locale |tr -d '"'`
bash-3.00# for loc in $LCs;do export $loc;done
bash-3.00# locale
LANG=de_DE.utf8
LC_CTYPE=de_DE@euro
LC_NUMERIC=de_DE@euro
LC_TIME=de_DE@euro
LC_COLLATE=en_US
LC_MONETARY=de_DE@euro
LC_MESSAGES=de_DE@euro
LC_PAPER=de_DE@euro
LC_NAME=de_DE@euro
LC_ADDRESS=de_DE@euro
LC_TELEPHONE=de_DE@euro
LC_MEASUREMENT=de_DE@euro
LC_IDENTIFICATION=de_DE@euro
LC_ALL=
NOTE : Everything still the same buggy ...
New round with modified export :
bash-3.00# LANG=de_DE.utf8
bash-3.00#
Code: Select all
LCs=`locale |tr -d '"'|cut -f1 -d=`
bash-3.00#
Code: Select all
for loc in $LCs;do export $loc=$LANG;done
bash-3.00# locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=de_DE.utf8
NOTE : LC_ALL is set , all values are "de_DE.utf8"
NOTE : locale command seems to quote the strings now for there is a dot in the string .
RESULT :
1) There are two kinds of garbled chars for the GUI : I name these "utf8-full" .
2) The pango warnings have gone .
3) sed is still not working correctly without any LC- pre_env ,
so
tested
LC_COLLATE=C which did NOT work
tested
LC_ALL=C which did work .
I tested also setting "LC_CTYPE=C" which i could not get to work (until now) and every other LC_VAR :
LC_NUMERIC
LC_TIME
LC_MONETARY
LC_MESSAGES
LC_PAPER
LC_NAME
LC_ADDRESS
LC_TELEPHONE
LC_MEASUREMENT
LC_IDENTIFICATION
set =C and they did not do any affect on sed .
SO
Code: Select all
VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'| LC_COLLATE=C sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
works in non-utf-8 environment
Code: Select all
VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'| LC_ALL=C sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
works in utf-8 and non-utf-8 envirnoment (so far).
*
SINCE the locale and encoding seems to be part of glibc it might differ from Puppy to Puppy versions .
The above tests had been made on Puppy-4.3 glibc-2.6.1 .
*
The html page mentiones the danish "°a|°A" which can be written also "aa|AA" for example :
Aalborg Kommune eller Ålborg Kommune
Germany has got "ae|AE" for "ä|Ä" , "oe|OE" for "ö|Ö" , "ue|UE" for "ü|Ü" and "ss" for (old)"ß" .
Since Spanish is mentioned i can also imagine some french special chars like "ç" for "c" or "è" for "e" .
There are actually lots of European languages with a slightly different "ABC" than the English .
*
Installing some /usr/share/locale/*/LC_MESSAGES/
glibc.mo i compiled with --prefix=/opt/glibc-2.6.1 by simply copying them there solved the 3 warnings i got by locale command :
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
Took me several weeks to figure that out that this meant the glibc.mo and not a /usr/lib/locale/default link to a directory ...
*
I hope i have not fogotten anything .