Charset parser latches to the first encoding

Now passing tests that pass multiple charsets in same doc. Only the
first legal one counts. Need to add a filter for legal charsets.