What is the encoding of incoming file? ReplaceText default encoding is UTF-8 which I think should be sufficient for this. But you are also writing raw file. Check content of the flow file by looking at data provenance. I think the raw file is likely being written the right way but whatever you are using to read the file is not showing you the content in the encoding you need to read this data properly.