would be helpfully to give us more details on the error and from where the data is taken (input).
In some scenario also the data has to be converted before using it by writing out with another encoding.
Also have a look here:
new UTF8Encoding(True) would be the UTF-8 with BOM