utf 8 - Foreign character encoding issue with CSV download -


i using utf8 encoding asp pages. want implement csv download functionality website. below response setup

with response     .buffer = true     .expires = 0     .clear     .charset = "utf-8"     .codepage = 65001     .addheader "content-type", "text/html;charset=utf-8"     .addheader "content-encoding", "utf-8"     .addheader "content-disposition", "attachment; filename=""ageddebtors.csv""" end 

encoding set response headers still getting encoded foreign characters in resulting csv. tried few things not able right. please let me know missing here

  set stream = createobject("adodb.stream")   stream.open   stream.type     = 2 'text   stream.position = 0   stream.charset  = "utf-8"   stream.writetext str 

you may want save converted stream new file, write this

  stream.savetofile filename, 2 

and close stream use

  stream.close 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -