support different encoding, e.g chinese.