[wellylug] utility to determine text file encoding?

Bruce Hoult bruce at hoult.org
Mon Mar 2 17:29:13 NZDT 2009


On Mon, Mar 2, 2009 at 5:21 PM, Joe Mahoney <joe at cheerschopper.com> wrote:
> Hi All
>
> Is there a nice little command line app that, given a text file, will
> tell me the encoding/charset of the file.

That would be a highly uncertain thing to try to figure out.  Ok, sure
if there is nothing above 127 then call it USASCII, and if you see
UTF-8 2 or 3 octet sequences used correctly then call it that.  But
otherwise ... how on earth would you tell some strange national
language encoding (let along the three or four different encodings for
Russian alone) without a dictionary for every possible language?



More information about the wellylug mailing list