Remove an assumption about how HTML encoding and character set encoding
interact at the possible loss of some efficiency.