Recently i noticed that Windows Notepad used ANSI as default encoding in all it’s .txt files, when i tried to move a mail that i wrote to my Ubuntu 16.04 system to send it from there. Default text editor gedit opened the file that looked like this:
This happens because gedit does not support ANSI Windows-1253 (Greek) by default. So there are many ways to make this work such as adding support for ANSI. But a quicker and more elegant way is to use iconv (https://linux.die.net/man/1/iconv) the linux build-in program to convert the encoding of characters from a input-file to another file with the desired encoding.
An example of this command is: iconv -f Windows-1253 -t UTF-8 Mail.txt -o Mail2.txt
Then Mail2.txt wil be encoded in UTF-8.
Hope this is going to help some of you!