how can I save all files in a directory using utf-8?
There is a need to change the default file encoding in IIS to display all foreign characters correct. The problem is: all old files are saved in (different/random) encodings.
Is there a way to open (in current) and save all those files safely to UTF-8?
If the files are text files then you can use the overloaded System.IO.File.WriteAllText() method and pass the UTF-8 encoding type. That should do the trick