Bug 943524 - fix charset and chardet processing to allow for unique IDs, r=jaws