Universal encoding detector for python 2 and 3
Requires Python 2.6 or later
chardet comes with a command-line script which reports on the encodings of one or more files:
% charade somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0
This is a port of Mark Pilgrim’s excellent chardet. Previous two versions needed to be maintained: one that supported python 2.x and one that supported python 3.x. With the minor amount of work placed into this port, charade now supports both in one codebase.
The base for the work was Mark’s last available copy of the chardet source for python 3000.
Does everything have to have a reason? No, but in this case the reason was to help out requests and anyone else who sorely needed this.
If x, y, or z (a colloquialism for other projects that may do the same thing) do exist and indeed existed before charade, then I’m disappointed that they didn’t make themselves better known. It would have saved me quite a few hours.