I have some files that Ubuntu can't read it ( ANSI encoding ) but Windows can read it well.
When I open it in gedit or notepad++ it seems like this :
Êã ÇáÊÍæíá áÜÜ
How can I make Ubuntu read ANSI encoded files well?
I have some files that Ubuntu can't read it ( ANSI encoding ) but Windows can read it well.
When I open it in gedit or notepad++ it seems like this :
Êã ÇáÊÍæíá áÜÜ
How can I make Ubuntu read ANSI encoded files well?
ANSI means more or less nothing --- the most probable candidate for your encoding is Windows-1252. You can convert the file with
but remember, most encodings (read the linked article if you are not sure about what that mean) can't be reliably guessed, so you need to know the exact encoding to give sense to your data.
From the comments it seems that you are most probably looking for some Arabic encoding --- in that case check
WINDOWS-1256
.The list of available encodings for
iconv
is on github, or you can find it with the commandNotice that just at the start of the list there are a bunch of "ANSI"-like encodings.
If you don't want to convert it as mentioned in Rmano's answer, you may use Geany or Kate to read/edit them ar they are, default Arabic encoding in Windows is CP-1256 (
WINDOWS-1256
). Just keep in mind that switching to UTF-8 is recommended over all. It is supported by Notepad++ and Windows default note editor.Geany
Kate
The gedit can work with files encoded with e.g. Windows-1250. Select "Open", "Additional Documents", Character encoding: "Central European (WINDOWS-1250"). If it is not there, add it there by this option.
I was trying to read a file in ANSI mode in ubuntu and was able to do it.
I tried sublime text, gedit, etc. but I was somehow failing, finally I tried the terminal in ubuntu, and cat command helped me.
I opened the terminal in the file location then used
cat filename.txt
And it worked like a charm, if the text file contains the ANSI syntax, it will be displayed properly.
Hope it helps.