ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

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:
  #1  
Old November 7th, 2003, 02:09 AM
Rousku Rousku is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 2 Rousku User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Headlineripper problem with special characters

I have this headlineripping script up and running but special characters causes major problems. Is there any way to html encode, change character encoding or replace scandic letters ö ä and å with html code. And I think it must be done before parsing.

//start

Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP")
theurl = "here is the url"
xml.Open "GET", theurl, False
xml.Send

//parsing

MyString = xml.responseText
strtolookfor = "<startlookingtext>"
endtolookfor = "<stoplookingtext>"
startleft = 1

//pasting
Response.Write("<someextrahtmlhere>" & theheadline & "<someextrahtmlhere>")

For example: If I use Server.HTMLEncode([theheadline]) to replace theheadline in pasting, it only encodes the mess what is already done. If the headline has ä ö or å for its last letter, string stops right there and causes <stoplookingtext> (some html tag) to crash.

Reply With Quote
  #2  
Old November 7th, 2003, 08:59 AM
Xander Xander is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 2 Xander User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Have you tried using regular expressions?

Reply With Quote
  #3  
Old November 12th, 2003, 11:13 PM
Rousku Rousku is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 2 Rousku User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post

I'm not quite familiar with reg exp. Anyone? There must be some solution.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Headlineripper problem with special characters


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


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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT