Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > XMLHTTP - trying to replace incorrect displayed chrs with the correct ones

Reply
Thread Tools

XMLHTTP - trying to replace incorrect displayed chrs with the correct ones

 
 
Graham Mattingley
Guest
Posts: n/a
 
      11-27-2003
Hi Group,

I have used xmlHTTP to grab a page from a server.. The page has the '£'
symbol in it, when it get to my site it is displayed as a '?'.. I have tryed
replace every way I know and it does not swap back..

I have tryed replace "?" , "£"
I have tryed chr(63) , chr(163)
I have tryed "?" , £

nothing works, except it does change the real '?' on the page, I mean the
'?' that started out as '?' and not as '£'
if I right a bit of code to count the '£' on the page it get the total right
including the original '?' and the '?' that are supposed to be '£'.. I dont
understand it I can count them by saying if {loopchr} = chr(63) but the the
chr(63) does not work in a replace statement..

I have examend the feed from theXMLHTTP and they are or seem to be got a '?'
and yet I cant replace them..

hope this makes sence

thanks in advance

Regards

Graham


 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      11-27-2003


Graham Mattingley wrote:

> Hi Group,
>
> I have used xmlHTTP to grab a page from a server.. The page has the '£'
> symbol in it, when it get to my site it is displayed as a '?'.. I have tryed
> replace every way I know and it does not swap back..
>
> I have tryed replace "?" , "£"
> I have tryed chr(63) , chr(163)
> I have tryed "?" , £
>
> nothing works, except it does change the real '?' on the page, I mean the
> '?' that started out as '?' and not as '£'
> if I right a bit of code to count the '£' on the page it get the total right
> including the original '?' and the '?' that are supposed to be '£'.. I dont
> understand it I can count them by saying if {loopchr} = chr(63) but the the
> chr(63) does not work in a replace statement..
>
> I have examend the feed from theXMLHTTP and they are or seem to be got a '?'
> and yet I cant replace them..


XMLHTTP is good at reading XML encoded as UTF-8 or UTF-16 however
reading pages encoded otherwise leads to trouble when you use responseText.
Thus you need to check what encoding the page has that you are trying to
to read and maybe use an ADODB.Stream object to read the page as there
you can set the encoding.
--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Japanese Text not displayed on Image Generated by Servlet on winXP, Linux but displayed on Win2000 boney Java 1 12-15-2006 02:24 PM
Want to replace WMP 10 visualizations with ones from Wmp 8/9 blnstr Computer Support 1 12-08-2006 04:43 AM
Msxml*.XMLHTTP vs. Microsoft.XMLHTTP yawnmoth Javascript 11 11-09-2006 08:44 PM
Python CGI problem: correct result, but incorrect browser response. Sullivan WxPyQtKinter Python 1 04-07-2006 06:43 AM
Hard drives--Are big ones more delicate than smaller ones? PowerPost2000 Computer Support 2 03-01-2005 10:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57