c# - Upload CSV with UTF-8 Characters to Server -


i'm able upload csv content browser server, non-ascii characters "š" in string "pštrossova" come out "p�trossova" when parse contents on server.

i'm processing file follows hoping preserve utf8 encoding, it's not working (result contains "p�trossova" want "pštrossova")

// read bytes http input stream         binaryreader b = new binaryreader(request.files["file"].inputstream);         byte[] bindata = b.readbytes( convert.toint32(request.files["file"].inputstream.length) );         string result = system.text.encoding.utf8.getstring(bindata); 


Comments