Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
UTF-8 working almost fine [nevermind]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
leo.fontenelle
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2005
Posts: 129
Location: Ribeirão Preto, Brasil

PostPosted: Fri Nov 17, 2006 4:44 am    Post subject: UTF-8 working almost fine [nevermind] Reply with quote

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
View user's profile Send private message
Satoshi
Apprentice
Apprentice


Joined: 06 Nov 2006
Posts: 180
Location: Brazil

PostPosted: Fri Nov 17, 2006 12:39 pm    Post subject: Reply with quote

I can't use ç when using UTF-8... 8O
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Fri Nov 17, 2006 12:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Satoshi
Apprentice
Apprentice


Joined: 06 Nov 2006
Posts: 180
Location: Brazil

PostPosted: Fri Nov 17, 2006 3:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
leo.fontenelle
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2005
Posts: 129
Location: Ribeirão Preto, Brasil

PostPosted: Sat Nov 18, 2006 12:47 am    Post subject: Dead keys at console with UTF-8 Reply with quote

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
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Sat Nov 18, 2006 10:49 am    Post subject: Re: Dead keys at console with UTF-8 Reply with quote

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
View user's profile Send private message
leo.fontenelle
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2005
Posts: 129
Location: Ribeirão Preto, Brasil

PostPosted: Sun Nov 19, 2006 2:15 am    Post subject: Re: Dead keys at console with UTF-8 Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum