meld shows output in unreadable alphabet (Japanese/Chinese?)

I am using meld to visualise a diff between two files. meld shows the diff output in... something like Japanese or Chinese?

Any idea what could happen? A locale issue? What is strange is that when using diff or colordiff in terminal, they work perfectly!

Thanks!

Meld shows unreadable output


Same problem here: File encoding is not correctly detected.

In my case this is due to meld's "detect-encodings" settings.

Check with:

$ gsettings get org.gnome.meld detect-encodings
['utf8']

Only utf8 is detected.

To workaround this issue add 'latin1' or whatever encoding your file has:

$ gsettings set org.gnome.meld detect-encodings "['utf8','latin1']"

Short extension to the last answer:

I had to add quotes to the [] part:

gsettings set org.gnome.meld detect-encodings "['utf8','latin1']"

executing it in a terminal in Ubuntu 16.04


I am pretty sure this is a encoding issue. Your terminal is probably in UTF-8 and the file is ISO. This is a new problem as early as 16.04, I think it may happen in 15.04 as well but I can confirm that it doesn't in 12.04.

Try checking your terminal where you are running meld by typing "locale". and you should get something like this:

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
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=

Then type " file " for each of your files and make sure they match your terminal.

On a side note I have been having a number of encoding issues between UTF-8 and ISO that really should never happen in 16.04.

What worked for me was running iconv on each file:

iconv -f ISO-8859-15 -t UTF-8 file_1.txt >file_1.tmp;
iconv -f ISO-8859-15 -t UTF-8 file_2.txt >file2.tmp;
mv file_1.tmp file_1.txt;
mv file_2.tmp file_2.txt;
meld file_1 file_2