10

Is the a tool (mac or online) that can help me to find out the character set of a text file, and then convert it to utf-8 ?

ragnarius
  • 381
  • 2
  • 5
  • 14

2 Answers2

11

If you are using Windows try downloading Notepad++. It should recognize the encoding and offers several conversions including UTF-8.

Beaner
  • 3,621
  • 1
  • 20
  • 16
9
  • for linux, use file -i filename
  • for mac, use file -I filename

For instance,

$ file -i readme.txt 
readme.txt: text/plain; charset=iso-8859-1

BTW, for converting, use iconv, for instance,

iconv -f ISO-8859-1 -t UTF-8 filename
SparkAndShine
  • 199
  • 1
  • 6