6

I have a server with no X, installed with no locales. There is a "C" locale.

I need to:

  • run server scripts (no console involved) to copy, move and gzip files towards local ext4 file-system, which should contain files with special encoding (Czech, Korean, Russian etc.), so the UTF-8 should be enabled.
  • see the file-names when I type commands in the console
  • have possibility to type most of the file-names with special letters, when logged trough ssh.

What should I do to reach that state? Goal is to give complete guide to change locale systemwide (as default).

Dee
  • 1,976

2 Answers2

8

I have to investigate it deeper and this solution helps me to solve it:

dpkg-reconfigure locales

choose cs_CZ.UTF-8 UTF-8 (default) and/or en_US.UTF-8 UTF-8

apt-get install console-data
dpkg-reconfigure console-data

set pc / qwerty / Czech / Standard / Standard or any other on your choice

dpkg-reconfigure console-setup

set Encoding to use on the console: UTF-8 set Charecter set: Latin2 - central Europe and Romanian, Fixed, 16 or any other on your coice

in file /etc/default/locale set

LANG=cs_CZ.UTF-8
LANGUAGE=cs_CZ.UTF-8
LC_ALL=cs_CZ.UTF-8
LC_CTYPE=cs_CZ.UTF-8

I dont know which steps are necessary, but after this all fonts and especially all ftp transfers and all tar-gzip actions work well.

Dee
  • 1,976
7

I would generate the English (United States) locale.

sudo locale-gen en_US.UTF-8

The system wide locales are stated in /etc/default/locale in Ubuntu, so give that file the contents:

LANG=en_US.UTF-8
Seth
  • 58,122
Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94