This is probably happening because your original string text already contains invalid characters.
Encoding conversion only makes sense if your input is a byte array.
So, you should read the file as byte array instead of string, or, as Henk said, specify the encoding for reading the file.