|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
VeriSign Code Signing Digital Certificates provides assurance to end users. Read about this and more in the free white paper: “How to Digitally Sign Downloadable Code for Secure Content Transfer.” Learn More! |
|
#1
|
|||
|
|||
|
Encoding problem in ASP file
Hi
I am getting problems in display of ASP files Everything is working fine on this site http://dmoz.org/World/ But when I import this data to my site there is some problem http://www.amiwired.com/directory.asp?ID=/World/ See the strange characters as in like Catalan?b Espa?b etc You can download the two asp files which are being used here file1 file2 Any help would be highly appreciated Email me: advanced_programmer@hotmail.com or IM me AIM: sandeepchn Thanks PS: dir.xyz is actually dir.asp and directory.xyz is actually directory.asp, I changed the extensions so that you can download them Last edited by superprogrammer : January 15th, 2004 at 05:49 AM. |
|
#2
|
|||
|
|||
|
Definitely some problem in the code given below...
-------------------------------------------------------- <% If Request("ID") = "" Then Response.Redirect "index.asp" End If Function getit(strAdd,strFrom,strTo) Dim objXMLHTTP, strGot, strSource Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP") objXMLHTTP.Open "GET", strAdd, False objXMLHTTP.Send strSource = objXMLHTTP.responseText 'strSource=server.URLEncode(strSource) 'strSource=server.htmlEncode(strSource) Set objXMLHTTP = Nothing Dim b,e b=Instr(strSource,strFrom) If b<>0 Then b=b+Len(strFrom) e=Instr(b,strSource,strTo) strGot=Mid(strSource, b, e-b) Else Response.Write " " End If getit = strGot End Function dim Grabbed, CopyFrom, CopyTo Grabbed = "http://dmoz.org/" & request.querystring("ID") CopyFrom = "</form>" CopyTo = "<table width=""95%"" cellpadding=0 cellspacing=0>" Dim strSource strSource = getit(Grabbed,CopyFrom,CopyTo) strSource=Replace(strSource,"<b>","") strSource=Replace(strSource,"</b>","") 'strSource=Replace(strSource,"ñ","ñ") 'strSource=Replace(strSource,"<li>","<br>") 'strSource=Replace(strSource,"<ul>"," ") 'strSource=Replace(strSource,"</ul>"," ") strSource=Replace(strSource,"<hr>"," ") strSource=Replace(strSource,"+1","2") 'strSource=Replace(strSource,"ñ","ñ") Dim once, twice once = Replace(strSource,"<a href=""desc.html","<a href=""http://dmoz.org/" & Request("ID") & "desc.html" & """" & " target=""_new") twice = Replace(once,"href=""/","href=""directory.asp?ID=") 'twice =replace(twice,"ñ","ñ") If twice = "" Then %> ------------------------------------- |
![]() |
| Viewing: Dev Shed Forums > Other > Project Help Wanted > Encoding problem in ASP file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|