fix charset in rewrite