Data export doesn't output Hebrew letters


https://forum.kartris.com/Topic3573.aspx
Print Topic | Close Window

By Booker - Mon 26 Jan 2015
Hello all,

I have many products named in Hebrew, when I export into spreadsheet each letter becomes a "?"like this ????? ?? ????????? ????
Is there any setting to fix that?
By bpaluch - Tue 5 May 2015
Thanks, Paul, for helping me find my way with this one.

In Kartris.vb, WriteToCSV function, change the line with the ASCII encoding

Dim data() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes(strData.ToString)

to this

Dim data() As Byte = System.Text.UTF8Encoding.UTF8.GetBytes(strData.ToString)

When exporting, choose SAVE, then open the file in notepad. You will see the HEbrew chars.

(If you open in Excel, it will be messed up)
By Paul - Tue 5 May 2015
Can you try changing the content type line to this

        Current.Response.AddHeader("Content-Type", "application/Excel; charset=utf-8")
This sets the header on the file, with the charset there it may be that Excel understands better how to open this directly.