Hello,
I'm building a system that needs to support Japanese.
The code below shows how I can either..
1. Response.write("JAPCHARACTERS"
or
2. Response.write(rs("JAPDATABASEDATA")
I am unable to do both on the same page without changing the codepage.
ps.. you may need a jap lang pack installed to see jap text.
<meta http-equiv="content-type" content="text-html; charset=utf-8">
<%
' try switching either of these two lines of code
Session.CodePage = 1252 ' english - allows response.write "‚‰¹Ž¿‹L˜^"
'Session.CodePage = 65001 ' unicode - allows response.write rs("Login" from jap database
Response.CharSet = "utf-8" ' not sure if this is needed
response.Write "session.codepage = " & Session.CodePage & "<BR>"
response.Write "response.write JAP = ‚‰¹Ž¿‹L˜^<BR>"
' get data from database
set tConnection = server.CreateObject("ADODB.Connection"
tConnection.Open "driver={SQL Server};server=gvddfdhdfhin;pwd=dbdfhin;database=JInzdfhaWebSite;"
tSQLStr = "select * from logins"
set rs = tConnection.Execute(tSQLStr)
If not rs.eof Then
response.Write "*****Logins Data*******<BR>"
do until rs.eof
response.Write rs("login" & "<br>"
rs.movenext
loop
else
response.Write "*****No Logins Data*******<BR>"
end if
rs.close
tConnection.close
%>
I'm building a system that needs to support Japanese.
The code below shows how I can either..
1. Response.write("JAPCHARACTERS"
or
2. Response.write(rs("JAPDATABASEDATA")
I am unable to do both on the same page without changing the codepage.
ps.. you may need a jap lang pack installed to see jap text.
<meta http-equiv="content-type" content="text-html; charset=utf-8">
<%
' try switching either of these two lines of code
Session.CodePage = 1252 ' english - allows response.write "‚‰¹Ž¿‹L˜^"
'Session.CodePage = 65001 ' unicode - allows response.write rs("Login" from jap database
Response.CharSet = "utf-8" ' not sure if this is needed
response.Write "session.codepage = " & Session.CodePage & "<BR>"
response.Write "response.write JAP = ‚‰¹Ž¿‹L˜^<BR>"
' get data from database
set tConnection = server.CreateObject("ADODB.Connection"
tConnection.Open "driver={SQL Server};server=gvddfdhdfhin;pwd=dbdfhin;database=JInzdfhaWebSite;"
tSQLStr = "select * from logins"
set rs = tConnection.Execute(tSQLStr)
If not rs.eof Then
response.Write "*****Logins Data*******<BR>"
do until rs.eof
response.Write rs("login" & "<br>"
rs.movenext
loop
else
response.Write "*****No Logins Data*******<BR>"
end if
rs.close
tConnection.close
%>