View previous topic :: View next topic |
Author |
Message |
h3rdi n00b
Joined: 02 Nov 2003 Posts: 25 Location: Berlin, Germany
|
Posted: Tue Aug 17, 2004 7:12 pm Post subject: unicode support problem |
|
|
Hi all!
I have build a gentoo-box recently for s/o else. Now the user came up with a CD burnded in Windows (Joliet / ISO-fs) with some filenames with German characters. All files with special characters were not readable from Gnome (Nautilus). I found out that I had forgotten most of the NLS stuff when compiling the kernel, so the whole system couldn't understand Unicode. After building a new kernel, everything works fine with the text console. The normal xterm also does well. Only all the Gnome apps still refuse to know Unicode characters. I've identified lots of apps that respect the nls use-flag. My questions:
- Is ist worth / necessary to rebuild the apps at all? Do the apps get their nls settings at build time from the kernel settings? This sounds a bit unbelievable to me.
- How comes the difference between text console and X apps (especially Gnome) when it comes to language settings? How can I get all X apps to just do what the system does (which is often what I want)?
Thanks in advance
Herdi |
|
Back to top |
|
|
TheX Guru
Joined: 31 Jul 2004 Posts: 349 Location: .de
|
Posted: Tue Aug 17, 2004 7:15 pm Post subject: |
|
|
I got the same prob too !
Sorry i cant help, but i hope there will be a solution.
wirklich! |
|
Back to top |
|
|
noathustra Tux's lil' helper
Joined: 08 Sep 2003 Posts: 129 Location: NYC
|
Posted: Wed Aug 18, 2004 7:48 am Post subject: |
|
|
Did you recompile your Gnome apps with UTF-8 and nls support? Whenever I emerge I always use emerge -av. The a results in emerge asking if you want to proceed (faster than p) and the v displays which Use flags have been set and which have not. I find both arguments very useful.
If you have recompiled with internationalization support you probably need to set your locale. Have a look at one of the numerous internationalization threads if you don't know how to do this. |
|
Back to top |
|
|
h3rdi n00b
Joined: 02 Nov 2003 Posts: 25 Location: Berlin, Germany
|
Posted: Wed Aug 18, 2004 5:01 pm Post subject: |
|
|
noathustra wrote: | Did you recompile your Gnome apps with UTF-8 and nls support? Whenever I emerge I always use emerge -av. The a results in emerge asking if you want to proceed (faster than p) and the v displays which Use flags have been set and which have not. I find both arguments very useful.
If you have recompiled with internationalization support you probably need to set your locale. Have a look at one of the numerous internationalization threads if you don't know how to do this. |
So far, I have only rebuilt the kernel, which seems to be OK for the console. At first, I thought that I get unicode support with the unicode use flag. But no package in the dep tree of gnome seems to respect this flag, as
Code: | emerge -epv gnome | grep unicode |
shows.
So, I still don't know, what to do to add unicode support to gnome. Do I only rebuild gnome now after the kernel, or must I set any more flags?
The locale (for the normal users) is set to de_DE@euro. But the locale settings should not have any effect. On a second machine (the same one, I type this on) everything works fine.
Thanks so far.
Herdi |
|
Back to top |
|
|
gna n00b
Joined: 19 Mar 2003 Posts: 38 Location: Beijing
|
Posted: Thu Aug 19, 2004 6:16 am Post subject: |
|
|
Kernel nls and userspace nls are different things. If you need applications to understand unicode:
1) make sure glibc was compiled with the nls flag (default is to use it)
2) your application and possibly some of its dependencies need to be compiled with the nls use flag
3) Depending on your system you may need to make the appropriate UTF-8 locale
4) set your locale environment variable(s)
more details here: https://forums.gentoo.org/viewtopic.php?t=166984 |
|
Back to top |
|
|
h3rdi n00b
Joined: 02 Nov 2003 Posts: 25 Location: Berlin, Germany
|
Posted: Thu Aug 19, 2004 5:45 pm Post subject: |
|
|
gna wrote: | Kernel nls and userspace nls are different things. If you need applications to understand unicode:
1) make sure glibc was compiled with the nls flag (default is to use it)
2) your application and possibly some of its dependencies need to be compiled with the nls use flag |
OK, these points are easy, I've used the default from start and not changed it.
Quote: | 3) Depending on your system you may need to make the appropriate UTF-8 locale
4) set your locale environment variable(s) |
Now, here my problem starts. I'm sitting in front of my own system right now and the locale is:
Code: |
$ locale
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=
|
No UTF8 here, but still on this system, UTF8 works. I can't check the locale setting on the other system (the one that doesn't work) right now, but I'm quite sure it is the same. The only difference I can make out is that at build time of the apps there was no kernel support for utf-8 (on the non-working system). Otherwise the two systems should be almost the same. Sorry for asking that question again, but if the apps were alredy compiled with the nls flag set (default), will it make sense to rebuild them again now after the kernel? If kernel and userspace nls settings are independent, this should change nothing. But then, I don't know, what would help. Any more ideas anyone?
Thanks so far
Herdi |
|
Back to top |
|
|
gna n00b
Joined: 19 Mar 2003 Posts: 38 Location: Beijing
|
Posted: Fri Aug 20, 2004 2:52 am Post subject: |
|
|
Quote: | No UTF8 here, but still on this system, UTF8 works. |
Actually you don't know that for sure. If no encoding is specified then the system will use the default encoding for that locale. Last time I looked this was iso8859-15 for German. However this will depend on which versions of X and glibc you are using. So it could be different on the two systems you are comparing if they have differing versions of glibc and X. It is much better to explicitly set the encoding also. UTF-8 support is in flux. For example I recently installed on a new machine and used a more recent version of glibc and found it make quite a few more UTF-8 locales than the previous version I used when I wrote the howto.
Quote: | Sorry for asking that question again, but if the apps were alredy compiled with the nls flag set (default), will it make sense to rebuild them again now after the kernel? If kernel and userspace nls settings are independent, this should change nothing. But then, I don't know, what would help. |
It makes no sense to recompile your applications because you recompiled the kernel. Nothing will change for GUI applications.
You should check that both have a de_DE.UTF-8@euro locale defined. Use and don't forget it will change the UTF-8 to utf8. You should check the locale on the other machine also because, for example, you set your locale in .xinitrc and use an X login manager e.g. kdm then that file will not be executed. So there are things that make a difference even though you would never guess that they would. |
|
Back to top |
|
|
h3rdi n00b
Joined: 02 Nov 2003 Posts: 25 Location: Berlin, Germany
|
Posted: Sun Aug 22, 2004 5:18 pm Post subject: |
|
|
gna wrote: | Quote: | No UTF8 here, but still on this system, UTF8 works. |
Actually you don't know that for sure. |
Yes, you're right. To be honest, I never wanted UTF-8 to work, I just wanted to be able to read ISO/Joliet CDs.
As it is not working after some more experiments (even when I force the de_DE.utf8 locale for all users), I will first have to do some more reading to understand how nls really works. As a quick workaround the files can be copied to HD and then renamed.
Quote: | It makes no sense to recompile your applications because you recompiled the kernel. Nothing will change for GUI applications. |
AH, good news here!
Thanks for your help
Herdi |
|
Back to top |
|
|
|