c# - Not able to export russian or turkish characters to csv from asp.net mvc -


i exporting data csv asp.net mvc controller using file method below. works fine english,french not working other languages likes russian,turkish. thoughts or helpful.

var bytes = encoding.unicode.getbytes(csv); var finaldata = new system.text.unicodeencoding().getpreamble()                     .concat(bytes).toarray(); actionresult result = this.file(finaldata, "text/x-csv", filename); 

i think has encoding, try this:

encoding iso = encoding.getencoding("iso-8859-1").getbytes(); 

in combination resource: https://www.terena.org/activities/multiling/ml-docs/iso-8859.html


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -