You get a bonus - 1 coin for daily activity. Now you have 1 coin

Garbled characters (mojibake) in Midnight Commander (mc)

Practice



Sometimes after installing Midnight Commander you may see an unpleasant picture with garbled squiggles instead of special characters (pseudographics)

Garbled characters (mojibake) in Midnight Commander (mc)

1. If this isn't a problem with the server's encoding and locale, and isn't a problem

Midnight Commander

then it might be a problem with the client's encoding (for example, PuTTY).

In this case, setting UTF-8 encoding in the Window - Translation section will help (when launching Putty)

2. if this is a problem with the default encoding and locale in the system, then change the configs using a utility or manually

Garbled characters (mojibake) in Midnight Commander (mc)

Open

/var/lib/locales/supported.d/local

and add the locale to the list of supported locales, if it doesn't already exist, for example:

en_US UTF-8

You can regenerate the supported locales using:

sudo dpkg-reconfigure locales

Open

/etc/default/locale

and check whether LANG and LANGUAGE have appeared :

LANG="en_US" LANGUAGE="en_US:UTF-8"

if they haven't appeared - then add them manually

reboot

reboot.

3. if the encoding problem occurs specifically only when launching mc

then you can try creating a command alias with an additional encoding option

~/.bashrc:
~/.bash_profile

alias mc="LANG=C mc"
created: 2017-05-21
updated: 2026-03-09
659



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "LINUX operating system"

Terms: LINUX operating system