# Console + UTF8 = possible?



## graudeejs (Nov 18, 2008)

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 (Nov 18, 2008)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/l10n.html


----------



## braveduck (Nov 18, 2008)

FreeBSD's console does not yet support UTF8 natively, but there is at least
one workaround -- sysutils/jfbterm


----------



## lyuts (Nov 18, 2008)

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 (Nov 18, 2008)

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 (Nov 18, 2008)

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 (Nov 18, 2008)

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 (Nov 19, 2008)

OK, i will try it as soon as i get home


----------



## braveduck (Nov 21, 2008)

> 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 (Dec 1, 2008)

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


----------



## blah (Jan 10, 2009)

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 (May 28, 2010)

*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.


----------



## larrygingras (May 28, 2010)

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 28, 2010)

http://forums.freebsd.org/showthread.php?t=311


----------



## DutchDaemon (May 28, 2010)

[ merged ]


----------



## BeastieBoy (Jul 3, 2010)

I see the thread as solved but there is no solution proposed?


----------



## soupbowl (Jul 6, 2010)

I can look into details, but I use zsh + tmux(/usr/ports/sysutils/tmux) and I have full UTF8 support.


----------



## soupbowl (Jul 6, 2010)

tmux*


----------



## graudeejs (Jul 6, 2010)

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


----------



## fairy (Jul 6, 2010)

killasmurf86 said:
			
		

> There was project to upgrade console to be able to display utf8


TEKEN_UTF8 is not very usable (see *#11* post in this thread) just like vt(4) driver.


----------



## aragon (Jul 7, 2010)

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.


----------

