as3Chardet is an ActionScript port of the source from mozilla's automatic charset detection algorithm