Today I nearly went mad because I had to determine the encoding of some html files.
I tried various command line tools without any success until a colleague showed me that firefox can
guess the encoding: In my version (3 under Ubuntu) it is located here: “View”>”Character Encoding”.
As I didn’t find that on the web, maybe this post will save somebody out there the trouble I had.




Or, if you want a script to do the work, try this: http://www.realdevelopers.com/blog/?p=82
… and read your company blog
Oops, seems that this is not a good idea at all! After an update Firefox did show different encodings!
And as it is a guess anyway you maybe want to know the probability of the guess being right. Luckily I found a python lib here: http://chardet.feedparser.org/, which does all of that. Some background is provided here: http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html
And for the fun the last page seems to have encoding errors…
)