0

I have created a page which is supposed to pull some information from a mysql database and display them. Another page is supposed to save the data to the database.

The problem is, that I am not even able to get the data in Persian or Arabic displayed correctly, instead I receive ? for each character.

I have the following codes in my asp:

@CODEPAGE=65001 LANGUAGE = "VBScript"

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

The html output file has the proper meta tag also, at least I believe.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

The database fields have the UTF-8 characterset.

The output is ???. I tried different other settings I had found after googling for a while, but all of them didn't help. I hope your advices do, so that I can get this project up and running?

2
Contributors
1
Reply
7
Views
4 Years
Discussion Span
Last Post by LastMitch
0

The output is ???. I tried different other settings I had found after googling for a while, but all of them didn't help. I hope your advices do, so that I can get this project up and running?

Instead of

Response.Charset = "UTF-8" 

try this:

Response.Charset = "windows-1256"

So the code should look like this:

@CODEPAGE=65001 LANGUAGE = "VBScript"
Response.CodePage = 65001
Response.Charset = "windows-1256"
Response.ContentType = "text/html"
Response.AddHeader "Content-Type", "text/html;charset=windows-1256"

<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />

This is should work. You can read this here:

http://en.wikipedia.org/wiki/Windows-1256

Edited by LastMitch: grammer

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.