View previous topic :: View next topic |
Author |
Message |
leo.fontenelle Tux's lil' helper
Joined: 29 May 2005 Posts: 129 Location: Ribeirão Preto, Brasil
|
Posted: Fri Nov 17, 2006 4:44 am Post subject: UTF-8 working almost fine [nevermind] |
|
|
I moved to UTF-8 a few months ago, and almost everything works fine. File system and text files content is UTF-8 by default. X11 apps work perfectly, and in CLI I am able to input non-ASCII characters like "ç", "ª" or (with dead keys) é, and much of the output is correct. The problem is: CLI error messages are in ISO 8859-1, and my terminal uses UTF-8. Example:
Code: | > man açsldfj
N�o existe a entrada açsldfj |
If I redirect stderr to a file and read it with gedit, � becomes "ã" (which was expected) is the file is read as ISO 8859-1 -- but then the "ç" becomes "ç". This behavior is consistent between the virtual terminal (e.g. Ctl+Alt+F1) and gnome-terminal.
I have read and followed the relevant Gentoo documentation, and searched a lot in the forums, but didn't find the answer. Would anyone have a clue about where did I blow up?
Edit: nevermind, it seems that only "man" does that, all other console tools output fine. |
|
Back to top |
|
|
Satoshi Apprentice
Joined: 06 Nov 2006 Posts: 180 Location: Brazil
|
Posted: Fri Nov 17, 2006 12:39 pm Post subject: |
|
|
I can't use ç when using UTF-8... |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Fri Nov 17, 2006 12:41 pm Post subject: |
|
|
Leo,
can you tell me/us how precisely you did configure the dead keys for usage in CLI?
Thanks in advance
swimmer |
|
Back to top |
|
|
Satoshi Apprentice
Joined: 06 Nov 2006 Posts: 180 Location: Brazil
|
Posted: Fri Nov 17, 2006 3:13 pm Post subject: |
|
|
swimmer wrote: | Leo,
can you tell me/us how precisely you did configure the dead keys for usage in CLI?
Thanks in advance
swimmer |
Well, I think it has to do with loadkeys. There's some file for this, I think, but I am not sure. |
|
Back to top |
|
|
leo.fontenelle Tux's lil' helper
Joined: 29 May 2005 Posts: 129 Location: Ribeirão Preto, Brasil
|
Posted: Sat Nov 18, 2006 12:47 am Post subject: Dead keys at console with UTF-8 |
|
|
swimmer wrote: | can you tell me/us how precisely you did configure the dead keys for usage in CLI? |
I took me a lot to learn, and I discovered it by accident, searching the Gentoo discussion forums for another issue about UTF-8. I is simply a matter of setting $CONSOLETRANSLATION in /etc/conf.d/consolefont (for me, it is "8859-1_to_uni").
Please notice this is only relevant to virtual consoles, not to X terminal emulators.
Apparently the Linux kernel doesn't support UTF-8 fully, so maybe sys-apps/kbd uses $CONSOLETRANSLATION to translate characters before sending them to the kernel. I read somewhere that real consoles can't support UTF-8, and anyone using framebuffer could be using X11. |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Sat Nov 18, 2006 10:49 am Post subject: Re: Dead keys at console with UTF-8 |
|
|
leo.fontenelle wrote: | It took me a lot to learn, and I discovered it by accident, searching the Gentoo discussion forums for another issue about UTF-8. I is simply a matter of setting $CONSOLETRANSLATION in /etc/conf.d/consolefont (for me, it is "8859-1_to_uni").
Please notice this is only relevant to virtual consoles, not to X terminal emulators.
Apparently the Linux kernel doesn't support UTF-8 fully, so maybe sys-apps/kbd uses $CONSOLETRANSLATION to translate characters before sending them to the kernel. I read somewhere that real consoles can't support UTF-8, and anyone using framebuffer could be using X11. |
Ah ok - I have these settings at the moment: Code: | CONSOLEFONT="ter-v12n"
CONSOLETRANSLATION="8859-1_to_uni" | But which keys are you using to get special chars?!?
Greetz
swimmer |
|
Back to top |
|
|
leo.fontenelle Tux's lil' helper
Joined: 29 May 2005 Posts: 129 Location: Ribeirão Preto, Brasil
|
Posted: Sun Nov 19, 2006 2:15 am Post subject: Re: Dead keys at console with UTF-8 |
|
|
swimmer wrote: | But which keys are you using to get special chars?!? |
I press ', `, ~. ^ or " and then a vowel; ~ + a becomes ã. I may also press AltGr then another key, but that's very specific on the keyboard layout; in example I press AltGr+] and get º, or AltGr+4 and get £. my keyboard layout is "br-abnt2". |
|
Back to top |
|
|
|