fix the string encoding problem