Zhi> Could I ask you, how can I know a file is encoded as 'UTF-8', Zhi> 'UTF-16' or something else? In general you can't tell. I'm not aware of any filesystems which maintain encoding information for individual files. You have to know or guess. Some encodings carry clues (BOM, etc), but in general you have to figure it out. Skip