correct encoding issue for utf-8 string