PDA

View Full Version : Tiếng việt trong asp, cứu em với các bác ơi!



dttt12
14-05-2009, 15:37
Em đang làm web bằng asp nhưng Sao khi select dữ liệu từ sql server thì nó không hiển thị được tiếng việt gì hết các bác ơi. Bác nào cao thủ về asp xem giúp em đoạn code sau bị lỗi chổ nào mà dấu má nhảy loạn xạ.

<%Option Explicit%>
<%Response.Buffer = true %>
<%response.CharSet = "UTF-8"%>
<%Session.Codepage=65001%>

<html>
<%
dim con, strSQL, rs
set con = server.CreateObject("ADODB.Connection")
con.Open application("strConnect")

set rs = server.CreateObject("ADODB.Recordset")
rs.CursorLocation = 3
strSQL = "COS_TinTucSuKien_Tin_theloai_SelectAll"
rs.open strSQL,application("strConnect"),0,1
%>

<head>
<style>
a:link{color:navy;text-decoration:none;}
a:visited{color:navy;text-decoration:none;}
a:hover{color:maroon;text-decoration:underline;}
</style>

<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Main </title>

</head>
<body topmargin="10" leftmargin="2">
<form name="main">

<table border="0" cellpadding="3" cellspacing="0" style="border:1px solid #008080; border-collapse: collapse; font-family:Vernada; font-size:12pt" bordercolor="#111111" width="100%" id="AutoNumber1" height="74">
<%while not rs.EOF and Response.IsClientConnected%>
<tr>

<td width="100%" bgcolor="#FFFFF4" height="22" style="border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom: 1px dotted #D6DED9; padding-top: 0" >


<%=trim(rs("theloai"))%>
</td>
</tr>
<%
rs.movenext
wend
if rs.State = 1 then rs.Close
set rs = nothing
%>
</table>
</form>
</body>
</html>
<%
con.Close
set con = nothing
session("page") = Request.ServerVariables ("PATH_INFO")
%>