MickeC
asked on
Arabic sql to web page
Hi!
I am trying to do a site that should include arabic, kurdic and english language.
It works fine if i hardcode it in html and it works fine when i paste it directly in to the sql db, but when i try to read it from db to web page it wont work.
Look at my code and images.
I am trying to do a site that should include arabic, kurdic and english language.
It works fine if i hardcode it in html and it works fine when i paste it directly in to the sql db, but when i try to read it from db to web page it wont work.
Look at my code and images.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ar" lang="ar" dir="rtl">
<head>
<!--#include file="inc/connection.asp"-->
<title>test</title>
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--
Development by PZ-Net AB. http://www.pz-net.com
Copyright 2011 PZ-NET. All rights reserved.-->
</head>
<body>
<%
Session.LCID = &H0801 ' Saudi Arabia
Session.CodePage = 1256
%>
Databas:<br />
<%
Dim page,rsMeta
sql="SELECT * FROM TblTest WHERE "
set rsMeta = conn.execute(SQL)
%>
<%= rsMeta("testTxt") %>
<%
rsMeta.close
set rsMeta = nothing
%>
Html1:<br />
¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿ ¿¿¿ ¿¿¿¿¿ ¿¿ ¿¿¿¿¿ . ¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿ ¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿ ¿¿¿¿¿¿ ¿ ¿¿¿¿ ¿¿¿¿¿¿¿¿¿
¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿ ¿ ¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿ ¿¿¿¿ ¿¿ ¿¿¿¿ ¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿ ¿¿¿¿¿
<!--#include file="inc/connclose.asp"-->
</body>
</html>
Hi,
you can try this
in you code
Databas:<br />
<%
Dim page,rsMeta
sql="SELECT * FROM TblTest WHERE "
conn.execute("SET NAMES utf8")
conn.execute("SET CHARACTER SET UTF8")
set rsMeta = conn.execute(SQL)
%>
<%= rsMeta("testTxt") %>
<%
rsMeta.close
set rsMeta = nothing
%>
you can try this
in you code
Databas:<br />
<%
Dim page,rsMeta
sql="SELECT * FROM TblTest WHERE "
conn.execute("SET NAMES utf8")
conn.execute("SET CHARACTER SET UTF8")
set rsMeta = conn.execute(SQL)
%>
<%= rsMeta("testTxt") %>
<%
rsMeta.close
set rsMeta = nothing
%>
ASKER
lsavidge:
I have checked the encoding on file level and it is UTF-8
Cenjoy100
I got this error:
'NAMES' is not a recognized SET option
I have checked the encoding on file level and it is UTF-8
Cenjoy100
I got this error:
'NAMES' is not a recognized SET option
Hi MickeC,
Try this setting in your connection.asp file after opening the connection
conn.Execute "SET names utf8;"
I might missing some where correct syntax or place.
Check it out and let me know still having any issue...
Try this setting in your connection.asp file after opening the connection
conn.Execute "SET names utf8;"
I might missing some where correct syntax or place.
Check it out and let me know still having any issue...
as well open connection with
conn.Open "Driver={MySQL ODBC 3.51 Driver};Server=ip;charset= UTF8;Datab ase=dbname ;User=user name; Password=password;Option=3 ;"
conn.Open "Driver={MySQL ODBC 3.51 Driver};Server=ip;charset=
ASKER
Could i use MySQL driver to a MS SQL db?
I have chnged the rest but still got the error about names.
I have chnged the rest but still got the error about names.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for all the input but i solved it.
http://stackoverflow.com/questions/326905/retrive-unicode-using-asp-from-sqlserver-2005
This is an encoding issue somewhere.