0

I am am having terrible output in gedit: See the image below: Terrible input

Where as when I tried to open on the command terminal, I was able to see the output :

aims@aims:~/Downloads/worldwide 3/output$ head -n5 My10.txt 

 990.net
 aol.com
 dataone.in.
 mail.hf.ah.cn.

I do not understand why this difference in output in Ubuntu 16.04.
If I want to process the text on Ubuntu, how I can get rid of the encoding?
I am fed up of converting one text file to another encoding. Is there any solution that will automatically detect and convert the file to human readable format? I do not want to check the file encoding everytime and then convert to the readable one. I want that this should happen automatically. If the encoding is not available then it should get downloaded.
Is there any solution on Ubuntu to convert the file automatically, so that I can process on those files?
Kindly help me.

terdon
  • 100,812
  • Please post an example of the actual file. We can't help much unless we know what the actual problem is. – terdon Apr 15 '17 at 15:31
  • @terdon Actually, the file is utf-8 character encoded. I tried to make it done with the python script while opening it. But the problem I think is not exactly the encoding, but the characters itself. Say the gedit is not able to read some characters, while are not exactly the english characters. May that is the reason. Actually, I tried to copy and paste the content of the file but could not paste it. Hence I use the cat command and what I got was readable characters. Hence, that is making the problem a bit fuzzy to explain. – Jaffer Wilson Apr 17 '17 at 05:16
  • I know. That's why I asked you to post an example of the actual file. – terdon Apr 17 '17 at 10:28

0 Answers0