Download CSV file -> UTF8?

Hi,

as you guys might know, if I open a CSV-file in Excel all the german umlauts () are displayed wrong (such as ü or ö). I need to save the csv file in UTF-8 charset to avoid this.

If I create a webfile on my webapp, fill it with the textcontent in a csv standard conform way, download it and then open it in excel, then this issue happens.

My question:
How can I save the textcontent in my webfile in the UTF-8 charset?

Thanks!

Try defining the encoding of the contents of the file prior to sending it to the user.

DefineEncoding(CSVContent, Encodings.UTF8)

[quote=380943:@Albin Kiland]Try defining the encoding of the contents of the file prior to sending it to the user.

DefineEncoding(CSVContent, Encodings.UTF8)

I tried this as well. It has no effect unfortunately. :-/

Tried ConvertEncoding?

Is it an in memory file or a file on disk?

It is in memory

I’ll try it now :smiley:

Doesn’t work either :frowning:

I got it!

I don’t have to use UTF-8. I need to use “WindowsANSI” as charset (even if im on a Mac).
strange…

Thanks @Albin Kiland for your help!

Excel always gives me a headache. Never does what you thing it should!
Glad it’s working :slight_smile: