• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Console + UTF8 = possible?

graudeejs

Son of Beastie

Thanks: 666
Messages: 4,616

#1
Is it possible to configure console to use uf8 encoding, display utf8 fonts, and use input for particular char sets (Latvian for example)

I have googled this, and failed...

if it's possible, how.
give me a link where to search

Not to get confused, i'm not speaking about xterm (nope, no gui, just console)
 

kamikaze

Well-Known Member

Thanks: 70
Messages: 366

#5
You can use UTF in a graphical terminal without limitations. I use rxvt-unicode. On the konsole real unicode isn't possible at all, you can only display 2^8 different characters at the same time.

I've been told that linux can dynamically map characters, but the whole thing is limited to a couple of extensions to the basic latin characters.

I cannot imagine this to work for east Asian text like Chinese or Japanese.
 

graudeejs

Son of Beastie

Thanks: 666
Messages: 4,616

#6
ok, just confirmed, what i know.
It ain't possible to use UTF8 in console.

kamikaze > i use UTF8 in xterm ;)
SirDice > that covers topic poorly, i have read it before
lyuts > in your link they use cons25r, which is specially designed for russian, and there is no suitable replacement for Baltic...

btw, baltic can fit in 2^8=256 chr map
I know a guy in Latvia made patch (which i can't find anymore) for FreeBSD that made console able use Baltic Fonts and characters (IO), but i wasn't able to build it (i don't know why).
I know he send it to FreeBSD, but they haven't implemented it and i doubt they will


thanks to all
 

kamikaze

Well-Known Member

Thanks: 70
Messages: 366

#7
I prefer rxvt-unicode for many reasons, such as the client/daemon mode, real transparency for the background colour and it doesn't slow programs that create lots of output, because it doesn't insist on rendering it all.

Code:
xterm> time -h cat /var/log/Xorg.0.log
        0.44s real              0.00s user              0.00s sys

urxvt> time -h cat /var/log/Xorg.0.log
	0.00s real		0.00s user		0.00s sys
 

braveduck

Member

Thanks: 6
Messages: 21

#9
ok, just confirmed, what i know.
It ain't possible to use UTF8 in console.
You must have skipped the post I wrote. Use jfbterm in ports. It makes it possible to use UTF8 in the console, not in a graphical terminal.

From the port descripton: "JFBTERM/ME takes advantages of framebuffer device and make it enable to display multilingualtext on console."

Here is the link to the installation manual (sorry, in russian, but you should get the gist)
 

kamikaze

Well-Known Member

Thanks: 70
Messages: 366

#10
Unfortunately jfbterm requires VESA for the konsole, which is not available on amd64.
 

blah

Guest


#11
Another workaround is to use sysutils/screen builtin character conversion. For instance, if you set koi8-r font and keymap for syscons then to see russian characters with unicode locale you need to specify `encoding utf-8 koi8-r'. Remember, that you don't need conversion under Xorg, only under syscons.

In 8-CURRENT there is an option TEKEN_UTF8 which maps unicode to 8bit charset. By default it maps unicode <-> cp437. Here is a patch to replace cp437 with koi8-r or cp1251. Beware, it doesn't translate input. So you need smth like input method for console such as uim-fep.
 

larrygingras

New Member


Messages: 19

#12
syscons UTF-8 support

It seems that syscons lacks UTF-8 encoding support.
Sure I not mean for console to be able to display all of unicode characters, but right now I have big problem running mc if I have LANG=ru_RU.UTF-8. syscons not even aware of multibyte characters so screen is garbled a lot.
I think it is possible for syscons to handle UTF-8 multibyte characters and translate them to console font encoding.

PS: Historically FreeBSD used koi8 encoding for cyrillic support but that makes a lot of pain with filenames encoding, conversions etc. Nowadays every modern software can use UTF-8 encoding and not bother about national characters support. So in my recent desktop FreeBSD installation I decided to use UTF-8 as my system local encoding (especially for filenames) and in KDE and a lot of other GUI software I use everything work perfectly.
 

graudeejs

Son of Beastie

Thanks: 666
Messages: 4,616

#19
yes, in Virtual terminal (xterm, urxvt etc) it works, we all know that ;)
anyway this is old thread...

also There was project to upgrade console to be able to display utf8 :D