You should not replace multiple characters with this method like s.Replace('ввв'); It works for me, if I write s.Replace('в'); It outputs: kввgd then Make sure your file encoding is UTF-8 (standard) If you really need to replace with ввв then write the output in a second string like you did before.