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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -