Remember that with threads, you can almost always wrap flows around as needed. If you want to write UTF-8 encoded content, you transfer the request stream to StreamWriter with the correct encoding:
using (Stream requestStream = request.GetRequestStream()) using (StreamWriter writer = new StreamWriter(requestStream, Encoding.UTF8)) { writer.Write(fileContent); }
Since you say you upload to the web service, be sure to set the content encoding. Since you did not send the request object there, I will consider it a normal HttpWebRequest .
Using HttpWebRequest, you tell the server what the encoding of content is using the ContentType property.
request.ContentType = "text/plain;charset=utf-8";
As already mentioned, FTP transfer alone can break it. If you can, make sure it is transmitted in binary mode and not in ASCII mode.
Joshua
source share