Project Help Wanted
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherProject Help Wanted

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old January 15th, 2004, 05:35 AM
superprogrammer superprogrammer is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Posts: 710 superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level)superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level)superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 Days 1 h 27 m 25 sec
Reputation Power: 5
Send a message via AIM to superprogrammer Send a message via MSN to superprogrammer Send a message via Yahoo to superprogrammer
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.

Reply With Quote
  #2  
Old January 15th, 2004, 07:15 AM
superprogrammer superprogrammer is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Posts: 710 superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level)superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level)superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 Days 1 h 27 m 25 sec
Reputation Power: 5
Send a message via AIM to superprogrammer Send a message via MSN to superprogrammer Send a message via Yahoo to superprogrammer
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
%>
-------------------------------------

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherProject Help Wanted > Encoding problem in ASP file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway