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

G

Graham Mattingley

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
 
M

Martin Honnen

Graham said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top