Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: TaoTePuh on August 17, 2010, 04:42:22 PM

Title: tc and self made locales (building ncmpcpp)
Post by: TaoTePuh on August 17, 2010, 04:42:22 PM
I have tried to build ncmpcpp (a ncurses based client for mpd). It works well with locale "C", even the German special characters (umlauts) are displayed properly.

But now comes the curiosity :

Switching locale to "de_DE.UTF-8", ncmpcpp shows the German umlauts not correctly!

I have exactly the opposite result expected ("C"=bad, "de"=OK).

What is wrong here?

Tao

PS:
I tried building some other locales with UTF-8 and ISO-8859-1 (eg "en_US.utf8", "en_US.iso88591") all with the same bad result: Special characters are displayed incorrectly - only locale "C" works.
Title: Re: tc and self made locales (building ncmpcpp)
Post by: TaoTePuh on August 17, 2010, 08:10:05 PM
Okay, it does seem that the current tc version of ncurses is the problem. I have ncurses rebuilt for my own with the option --enable-widec (compile with wide-char/UTF-8 code) and then again ncmpc and ncmpcpp. Both programs now work with locale "de_DE-UTF-8".

I suspect that this (ncurses) is the reason why the current tc version of mc does not work with "UTF-8".

Title: Re: tc and self made locales (building ncmpcpp)
Post by: bmarkus on August 18, 2010, 01:17:53 AM
Regarding UTF-8 see this thread:

http://forum.tinycorelinux.net/index.php?topic=6989.0
Title: Re: tc and self made locales (building ncmpcpp)
Post by: curaga on August 18, 2010, 04:21:05 AM
Use a non-utf8 locale in the meantime, ie just de_DE or de_DE@euro.
Title: Re: tc and self made locales (building ncmpcpp)
Post by: TaoTePuh on August 18, 2010, 08:34:42 AM
@bmarkus
Thanks for the link. Now I know that (current) do not harmonize tc and utf-8. And it does not appear, as would that be in the near future. That is very unfortunate ...

@curaga
Thanks for the hint. But, sadly, that I am living here in an utf-8 environment. I therefore need utf-8 for at least the filesystem (samba shares).

Do you know a way to set locale to non-utf-8 but still working successful with an utf-8-filersystem?
Title: Re: tc and self made locales (building ncmpcpp)
Post by: curaga on August 18, 2010, 03:11:22 PM
I'm under the impression that it should just work; what happens if you try?
Title: Re: tc and self made locales (building ncmpcpp)
Post by: TaoTePuh on August 19, 2010, 06:09:38 PM
Now I have tried several configurations. The following works well, but I still have a big problem (see below).


I can see file names with special characters (german umlauts) in aterm, LXTerm and via ssh session:

Code: [Select]
echo "äöü€" > file_äöü€.txt
cat file_äöü€.txt
äöü@€

EmelFM2 also shows the names correctly.

But if I e.g. use geany to open a file, the file name will not display properly. Even with, for example PCManFM the file names are not displayed correctly.

Could it be that there is a problem with GTK?
Title: Re: tc and self made locales (building ncmpcpp)
Post by: TaoTePuh on August 19, 2010, 09:33:17 PM
My fault. I just had to change G_FILENAME_ENCODING=iso8859-15 in /etc/profile.
Title: Re: tc and self made locales (building ncmpcpp)
Post by: curaga on August 20, 2010, 04:30:51 AM
Yeah, GTK doesn't have autodetection if you don't tell it to:

export G_FILENAME_ENCODING=@locale