Skip to content

CLI Settings

Lorenzo Paleari edited this page Jul 1, 2022 · 3 revisions

UTF-8

Mac OS X

Mac terminal supports UTF-8 codes by default.

Linux

Check that you have the locales package installed:
dpkg -l locales
If not jump to CONFIGURE part.

You could check if the terminal supports UTF-8 by typing the following command: locale
The result should look like this:

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

It is not necessary to have en_US language, but to have .UTF-8 has shown in the snippet code.

Configure UTF-8

Type in a terminal:
apt-get install locales

As root, type:
dpkg-reconfigure locales
you can navigate that list with the up/down arrow keys, for example choose en_US-UTF-8.

edit your .bashrc by adding the following lines:

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

Run the locale command, the output should be similar to snippet code shown before.

Windows

CMD do not support by default UTF-8 Character Table.

It could be enabled temporarily by typing:
chcp 65001

Every time that you open a new terminal to play with the CLI interface you should type in that command.

Clone this wiki locally