handle the charset of HTML documents