PDA

View Full Version : [Solved] Console + UTF8 = possible?


graudeejs
November 18th, 2008, 15:01
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)

SirDice
November 18th, 2008, 15:13
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/l10n.html

braveduck
November 18th, 2008, 16:39
FreeBSD's console does not yet support UTF8 natively, but there is at least
one workaround -- sysutils/jfbterm

lyuts
November 18th, 2008, 16:50
Here is one way to do this that I have found.
Actually, it is for russian, but i think you can easily change it for your language.

http://www.opennet.ru/tips/info/1785.shtml

kamikaze
November 18th, 2008, 16:53
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
November 18th, 2008, 18:26
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
November 19th, 2008, 00:45
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.

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

graudeejs
November 19th, 2008, 14:15
OK, i will try it as soon as i get home

braveduck
November 21st, 2008, 10:43
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 (http://kvasdopil.livejournal.com/31964.html) to the installation manual (sorry, in russian, but you should get the gist)

kamikaze
December 1st, 2008, 12:35
Unfortunately jfbterm requires VESA for the konsole, which is not available on amd64.

blah
January 10th, 2009, 14:02
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 (ftp://ftp.lissyara.su/users/Guest/sc-unikoi8r.diff) or cp1251 (ftp://ftp.lissyara.su/users/Guest/sc-unicp1251.diff). Beware, it doesn't translate input. So you need smth like input method (http://en.wikipedia.org/wiki/Input_method) for console such as uim-fep.

larrygingras
May 28th, 2010, 17:00
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.

larrygingras
May 28th, 2010, 17:05
I think I post to wrong forum section, but I see no way of move or delete
Please move to proper one
Excuse me for my mistake

SirDice
May 28th, 2010, 17:07
http://forums.freebsd.org/showthread.php?t=311

DutchDaemon
May 28th, 2010, 17:35
[ merged ]

BeastieBoy
July 3rd, 2010, 15:10
I see the thread as solved but there is no solution proposed?

soupbowl
July 6th, 2010, 10:27
I can look into details, but I use zsh + tmux(/usr/ports/sysutils/tmux) and I have full UTF8 support.

soupbowl
July 6th, 2010, 10:27
tmux*

graudeejs
July 6th, 2010, 10:39
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

fairy
July 6th, 2010, 12:57
There was project to upgrade console to be able to display utf8 :DTEKEN_UTF8 is not very usable (see #11 post in this thread) just like vt(4) (http://wiki.freebsd.org/Newcons) driver.

aragon
July 7th, 2010, 01:52
Here's some more information:

http://wiki.freebsd.org/SysconsUnicodeProject
http://lists.freebsd.org/pipermail/freebsd-current/2009-July/009351.html

Screenshot link in the mailing list post.