Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Codepages

Status
Not open for further replies.

puitar

Programmer
Apr 8, 2001
64
AU
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=&quot;content-type&quot; content=&quot;text-html; charset=utf-8&quot;>
<%
' try switching either of these two lines of code
Session.CodePage = 1252 ' english - allows response.write &quot;‚‰¹Ž¿‹L˜^&quot;
'Session.CodePage = 65001 ' unicode - allows response.write rs(&quot;Login&quot;) from jap database

Response.CharSet = &quot;utf-8&quot; ' not sure if this is needed

response.Write &quot;session.codepage = &quot; & Session.CodePage & &quot;<BR>&quot;
response.Write &quot;response.write JAP = ‚‰¹Ž¿‹L˜^<BR>&quot;



' get data from database
set tConnection = server.CreateObject(&quot;ADODB.Connection&quot;)
tConnection.Open &quot;driver={SQL Server};server=gvddfdhdfhin;pwd=dbdfhin;database=JInzdfhaWebSite;&quot;
tSQLStr = &quot;select * from logins&quot;
set rs = tConnection.Execute(tSQLStr)

If not rs.eof Then
response.Write &quot;*****Logins Data*******<BR>&quot;
do until rs.eof
response.Write rs(&quot;login&quot;) & &quot;<br>&quot;
rs.movenext
loop
else
response.Write &quot;*****No Logins Data*******<BR>&quot;
end if

rs.close
tConnection.close


%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top