Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp access utf ÖÐÎÄ ÂÒÂëÔõô°ì


asp ÖÐÎÄÂÒÂë,asp access ÂÒÂë,asp ˢкóÂÒÂë,asp utf 8ÂÒÂë,ajax ÂÒÂë asp,asp ºº×ÖÂÒÂë,aspÂÒÂëÔõô°ì
ÓÃutf-8±àÂëÓÃÔÚеÄÍøÕ¾ÉÏ£¬²»ÏëÎÊÌ⻹Õæ¶à£¬ËùÒÔÕÒÁËЩÎÄÕ£¬Ìû×Ó£¬¿´ÁË¿´£¬µÈÏÂÓÐÓõľÍÌùÏÂÃæÁË¡£
½ñÌ죬ÎÒ¿ªÊ¼°Ñ CODEPAGE="936" ¸Ä³É CODEPAGE="65001"
°Ñcharset=gb2312¸Ä³É charset=utf-8
¿ÉÊÇ»¹ÊÇÂÒÂ룬ֻҪÊǽű¾Óõĵط½»¹ÊÇÂÒÂ룬ÏÖÔÚÖÕÓÚÕÒµ½ÎÊÌâÁË£¬¾ÍÊǵ±½Å±¾Êä³öʱºò£¬ÒªÒÔutf-8±àÂëÊä³ö¡£
¾ÍÊÇÒª¼ÓÒ»¾ä<% Response.Charset = "utf-8" %>
¢ÙÊ×Ïȵ±È»ÊÇÒ³Ãæ±¾ÉíÓÃutf-8±àÂ룬ÔÚDWн¨Ò³Ê±Ä¬ÈϱàÂ붨Ϊ“Unicode(UTF-8)”
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
' ¢ÚCODEPAGE="65001" ¸æËß·þÎñÆ÷Ò³ÃæʹÓÃUTF-8±àÂëµÄ
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
' ¢Ûcharset=utf-8¸æËßä¯ÀÀÆ÷Ò³ÃæʹÓÃUTF-8±àÂëµÄ
</head>
<body>
<% Response.Charset = "utf-8" %>
' ¢Ü·þÎñÆ÷Êä³ö±àÂëΪutf-8
</body>
</html>
ˢкóÓÖ±ä³ÉÂÒÂ룬»òÕßä¯ÀÀÆäËûµÄgb2312µÄÒ³Ãæ»ØÀ´ÓÖÂÒÂëÁË¡£ÖµµÃÓÖÈ¥googleÁËһϣ¬ºÇºÇ£¬»¹ÊÇÕÒµ½´ð°¸ÁË
¿´¿´ÏÂÃæµÄÎÄ×Ö£¬¾ÍÖªµÀÁË£¬ËùÓÐÔÚºóÀ´ÎÒ¼ÓÁËÕâ¸ö£¬³ÌÐò¶¥¶Ë
<%Session.CodePage=65001%>
<%@ codepage=936%>¼òÌåÖÐÎÄ
<%@ codepage=950%>·±ÌåÖÐÎÄ
<%@ codepage=65001%>UTF-8
codepageÖ¸¶¨ÁËIIS°´Ê²Ã´±àÂë¶ÁÈ¡´«µÝ¹ýÀ´µÄ´®´®£¨±íµ¥Ìá½»£¬µØÖ·À¸´«µÝµÈ£©¡£
³öÂÒÂëµÄÔ­ÒòÒ²¾ÍÊÇÍøÕ¾ÒªÕûºÏµÄʱºòÄ£¿é±àÂë²»Ò»ÑùÒýÆðµÄ¡£
²»Òª×ª»»ÈκÎÄ£¿éÍøÒ³µÄ±àÂë¸Ãutf-8µÄ»¹ÊÇutf-8£¬¸ÃGb22312µÄ»¹ÊÇGb2312
½«GB2312Ä£¿éµÄconn.aspÎļþÖмÓÈëÁËÒÔÏÂÕâ¶Î´úÂë
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Session.CodePage=936%>
Ò»ÇÐOK!
ͬÑùÔÚÔÚUtf-8Ä£¿éµÄ°üÎļþ£¨Èçconn.asp£¬µ«ÊÇҪעÒâconn.asp±ØÐëÊÇÔÚµÚÒ»Ðе÷Óã©×îÇ°Ãæ¼ÓÉÏ
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
Õ⼸Ìì䶫Î÷ʱ×ÜÊÇÓöµ½ÂÒÂ룬ÓôÃÆ£¬ÒÔÇ°´ÓÀ´Ã»Ñо¿¹ý±àÂ룬ֻÊÇÄùýÓï¾äÖ±½ÓÓã¡ÏÂÎç¾­¹ýÑо¿ºóÎҵóöÒÔϽáÂÛ£¡
Ê×ÏÈ£¬Ñ¡Ôñ±àÂ룺Äã±ØÐë°´ÕÕÄãÒ³ÃæµÄÄÚÈÝÑ¡Ôñ±àÂ룬²»¹ý½¨Òéǰ̨ºǫ́¶¼Ê¹ÓÃutf-8±àÂ룬·½·¨ÊÇÔÚconn.aspÖмÓÈ룺
ÒýÓÃ
<%@ CODEPAGE=65001 %>
<% Response.CodePage=65001%>


Ïà¹ØÎĵµ£º

asp´ÓÊý¾Ý¿âÖÐÊä³öµÄ¶«Î÷»»ÐÐ

 <%  
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from 0791idc_News where BigClassName='¼Ò×°¿ÎÌÃ' order by ID desc"
rs.Open sql,Conn,1,1
if rs.eof and rs.bof then
  response.Write("ÔÝʱûÓмǼ")
else
%>
         ......

ASPÖÐÈçºÎ±íµ¥ÔªËصĴ«µÝ

¡¡¡¡Ñ§Ï°Ä¿µÄ£ºÑ§»áÓÃ±íµ¥ÔªËØÏò·þÎñÆ÷´«ËͱäÁ¿£¬È»ºóÏÔʾ±äÁ¿ÔÚ¿Í»§¶ËµÄä¯ÀÀÆ÷¡£
¡¡¡¡Ê×ÏÈ£¬ÈÃÎÒÃÇÀ´¿´Ò»ÏÂDREAMWEAVERµÄ±íµ¥ÔªËØëˢ¡£
¡¡¡¡ÏÂÃæÎÒÃÇÀ´Ò»¸öÒ»¸ö¿´±íµ¥ÔªËØ¡£1¡¢Îı¾Óò£¬Õâ¸öÊÇ×î»ù±¾µÄ£¬´«Ë͵ÄÊÇÎı¾ÐÅÏ¢£¬Ò»°ãÓû§Ãû£¬ÃÜÂ붼ҪÓÃÕâ¸ö´«ËÍ£¬²»¹ýÒªÊÇÃÜÂëµÄ»°ÒªÔÚÀàÐÍÀïÃæÑ¡ÔñÃÜÂ룬ÕâÑù¾Í»áÒÔ*´úÌæÏÔʾ³ ......

ASPÑ­»·Êä³ö±í¸ñÐÐtrµÄ·½·¨

  <%
for i=1 to rs.recordCount '±äÁ¿i´Ó1Ñ­»·µ½Êý¾Ý¿âÖеÄÈ«²¿¼Ç¼Êý
if (i mod 1 =1) then 'ÿ¸ötr¼´Ã¿ÐÐÏÔʾ1¸ö¼Ç¼,¿É¸ù¾ÝÐèÒª×ÔÐÐÐÞ¸Ä, ½«×ó±ßµÄ1ÐÞ¸ÄΪ2¼´ÏÔʾÁ½ÐС£
response.write "<tr align='center'>"
end if
%>
´Ë´¦ÎªÒªÑ­»·µÄÄÚÈÝ
  <%if (i mod 1 = 0) then ......

¹ØÓÚAccessºÍExcelµÄÁ¬½Ó×Ö·û´®

1.Á¬½ÓAccessµÄÁ¬½Ó×Ö·û´®
string strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @FileName;
2.Á¬½ÓExcel
string strExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + @FileName + ";Extended Properties=Excel 8.0;"; ......

asp¶ÁÈ¡word ÎĵµÄÚÈÝת»»Îª¶þ½øÖÆÊý¾ÝÁ÷

Dim FilePath,FileName
Set ObjFileStream = Server.CreateObject("ADODB.Stream")
ObjFileStream.Type = 1
ObjFileStream.Mode = 3
ObjFileStream.open
ObjFileStream.LoadfromFile FilePath&"\"&FileName&".doc"
ObjFileStream.Position = 0
response.binarywrite  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ