mysqlcharset

MySQL - broken accented characters with asp classic (pt-br)


Please, I am having this issue that is broking my brain!

The site <title> has the word Promoção and the Mysql database also has words with accented characters.

If I use Response.CodePage=65001 in the ASP code, the word from the database show correctly, but the word in the title show the symbol �.

If I dont use Response.CodePage=65001 the title stay correct and the accented word from the database show �

Please, what can I do?

PS.: I already tried use use:

charset=UTF-8 and charset=ucs2 in the database connection

also tried

Response.AddHeader "Content-Type", "text/html;charset=UTF-8"

Response.CodePage = 65001

Response.CharSet = "UTF-8"


Solution

  • Answering my question, the page.asp need to be save as Unicode (UTF-8) and the top of the each page need the line <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>