Issue #123 respect charset preference when invoking htmlentities()