fix bug misbehavior from utf-8 to ascii