19

when I open a tty (Ctrl + Alt + F1) it doesn't have utf-8 support. How can I enable it?

14

There is a program unicode_start that puts the console in Unicode mode. In addition, the console can support a codepage of 256 (or 512) characters only at any given time, so you need to make sure that you have loaded a console font with the appropriate characters.

The Linux kernel maintainers do not accept patches for better Unicode support on the console because the console is to be used as an emergency interface. What needs to be done is write a terminal emulator for the Linux framebuffer that undertakes the support for Unicode. Something like a 'getty' replacement. This aspect of open-source development did not receive yet much attention.

Another deficiency with the existing Unicode of the Linux console is that you cannot use dead keys.

| improve this answer | |
  • 1
    "What needs to be done is write a terminal emulator for the Linux framebuffer that undertakes the support for Unicode." → fbterm? – syockit May 21 '13 at 4:56
3

You should install the console-data package. If you've already installed this package, reconfigure it using

dpkg-reconfigure console-data

And select the correct keyboard disposition.

| improve this answer | |
3

If your system already has necessary Unicode locale and fonts, you just need to configure it to use them.

Check current locale configuration:

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_IE.UTF-8
LC_TIME=en_IE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_IE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_IE.UTF-8
LC_NAME=en_IE.UTF-8
LC_ADDRESS=en_IE.UTF-8
LC_TELEPHONE=en_IE.UTF-8
LC_MEASUREMENT=en_IE.UTF-8
LC_IDENTIFICATION=en_IE.UTF-8
LC_ALL=

LC_ALL covers all separate LC_ variables. So you can set everything with:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

Then, for the font:

sudo dpkg-reconfigure console-setup

-- choose one which supports Unicode. Follow these instructions to choose the font (first select UTF-8 and then the combination of characters you need, Extended Latin, Latin+Cyrillic+Greek etc).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy