Locale support.
Hi, all!
I have locale problems with my images, so I try to figure-out what I'm doing wrong.
So, 'locale' command output is
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
# opkg list_installed|grep glibc glibc-binary-localedata-ru-ru - 2.6.1-r12 - glibc-charmap-utf-8 - 2.6.1-r12 - glibc-gconv - 2.6.1-r12 - glibc-gconv-iso8859-1 - 2.6.1-r12 - glibc-gconv-koi8-r - 2.6.1-r12 - glibc-gconv-unicode - 2.6.1-r12 - glibc-locale-ru - 2.6.1-r7 - glibc-localedata-i18n - 2.6.1-r12 - glibc-localedata-iso14651-t1 - 2.6.1-r12 - glibc-localedata-iso14651-t1-common - 2.6.1-r12 - glibc-localedata-ru-ru - 2.6.1-r12 - glibc-localedata-translit-circle - 2.6.1-r12 - glibc-localedata-translit-cjk-compat - 2.6.1-r12 - glibc-localedata-translit-combining - 2.6.1-r12 - glibc-localedata-translit-compat - 2.6.1-r12 - glibc-localedata-translit-font - 2.6.1-r12 - glibc-localedata-translit-fraction - 2.6.1-r12 - glibc-localedata-translit-narrow - 2.6.1-r12 - glibc-localedata-translit-neutral - 2.6.1-r12 - glibc-localedata-translit-small - 2.6.1-r12 - glibc-localedata-translit-wide - 2.6.1-r12 - glibc-utils - 2.6.1-r12 -
But I have problems with lots of UTF-8 characters on file system and applications. 'date' command works properly reporting according to locale. wget, however have problems, inventing names which contain junk. However, using scp, I'm able to store normal UTF-8-named files from my desktop Debian. ASCII characters in names are always OK. both wget and ls are stand-alone in my configuration.
Any ideas where to look?
All the best,
S.
Quoted 3 lines · Sergey Lapin
But I have problems with lots of UTF-8 characters on file system and applications. 'date' command works properly reporting according to locale.
If you have a problem with VFAT and similar file systems, than you need an appropriate kernel fs/nls module and then edit /etc/fstab and/or /etc/udev/scripts/mount.sh.
Example: http://ftp.penguin.cz/pub/users/utx/zaurus/files/mount/
Locale definition example: http://ftp.penguin.cz/pub/users/utx/zaurus/files/czech/
(Yes, you may need empty /usr/lib/locale/{locale} for GPE login GUI.)
Quoted 4 lines
wget, however have problems, inventing names which contain junk. However, using scp, I'm able to store normal UTF-8-named files from my desktop Debian. ASCII characters in names are always OK. both wget and ls are stand-alone in my configuration.
For historical reasons, HTTP characters are converted to 7 bits. If you see something like "%C5%BE%C5%99%C5%A1" after using wget, then it is not a bug, it is a feature.
Signature · 2 lines
Stanislav Brabec http://www.penguin.cz/~utx/zaurus
Quoted 4 lines · Stanislav Brabec
Sergey Lapin wrote:
If you have a problem with VFAT and similar file systems, than you need an appropriate kernel fs/nls module and then edit/etc/fstaband/or/etc/udev/scripts/mount.sh.
Thanks, all this is already done.
Quoted 4 lines
For historical reasons, HTTP characters are converted to 7 bits. If you see something like "%C5%BE%C5%99%C5%A1" after using wget, then it is not a bug, it is a feature.
No, it tries to convert, but fails.
So, as I see a problem is in wget itself.
using bash as shell, I can create directories fnd files with whatever names I like,
so it seems this stuff is not locale-related.
Thanks a lot,
S.
Quoted 6 lines · Sergey Lapin
Quoted 3 lines · Stanislav Brabec
For historical reasons, HTTP characters are converted to 7 bits. If you see something like "%C5%BE%C5%99%C5%A1" after using wget, then it is not a bug, it is a feature.
No, it tries to convert, but fails.
So, as I see a problem is in wget itself.
Are you using busybox wget or GNU wget?
What exactly happens?
With GNU wget you can try --restrict-file-names=nocontrol
I think that wget http:// should never produce files with names with accents, at least for most servers. wget ftp:// can create such files, but as FTP provides no support for charset, wget saves them as they are with no conversion and with no idea about charset.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
Quoted 9 lines · Stanislav Brabec
Quoted 6 lines · Sergey Lapin
Quoted 3 lines · Stanislav Brabec
For historical reasons, HTTP characters are converted to 7 bits. If you see something like "%C5%BE%C5%99%C5%A1" after using wget, then it is not a bug, it is a feature.
No, it tries to convert, but fails.
So, as I see a problem is in wget itself.Are you using busybox wget or GNU wget?
GNU wget.
Quoted 2 lines
What exactly happens?
Some characters of file name either replaced with trash or left as %xx sometimes it is more than a half of file name. ASCII characters are fine, though.
Quoted 2 lines
With GNU wget you can try --restrict-file-names=nocontrol
Ah, thanks! This one is exactly what I need!
Quoted 5 lines
I think that wget http:// should never produce files with names with accents, at least for most servers. wget ftp:// can create such files, but as FTP provides no support for charset, wget saves them as they are with no conversion and with no idea about charset.
Well, setting mentioned above works like charm. Thanks a lot for info!
Quoted 6 lines · Sergey Lapin
But I have problems with lots of UTF-8 characters on file system and applications. 'date' command works properly reporting according to locale. wget, however have problems, inventing names which contain junk. However, using scp, I'm able to store normal UTF-8-named files from my desktop Debian. ASCII characters in names are always OK. both wget and ls are stand-alone in my configuration.
Can you give some specific examples of what is going wrong for you? Is it just wget that has this issue, or is it all applications?
p.
Quoted 10 lines · Phil Blundell
Quoted 6 lines · Sergey Lapin
But I have problems with lots of UTF-8 characters on file system and applications. 'date' command works properly reporting according to locale. wget, however have problems, inventing names which contain junk. However, using scp, I'm able to store normal UTF-8-named files from my desktop Debian. ASCII characters in names are always OK. both wget and ls are stand-alone in my configuration.
Can you give some specific examples of what is going wrong for you? Is it just wget that has this issue, or is it all applications?
I don't want to polute mailing list with garbled Russian strings. I just need to mention that some characters get garbled (some replaced with trash,
some with %xx, which is weird. This is with GNU wget. I don't use busybox one. Other affected program is rtorrent (FTBFS at the moment, btw). LANG is set properly in both cases.
date and bash work as expected. Most other apps work perfectly. I don't use any GUI at the moment though.
S.