Groups | Blog | Home
all groups > inetserver asp general > november 2003 >

inetserver asp general : XMLHTTP - trying to replace incorrect displayed chrs with the correct ones


Graham Mattingley
11/27/2003 4:17:42 PM
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

Martin Honnen
11/27/2003 5:22:37 PM


[quoted text, click to view]

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/
AddThis Social Bookmark Button