Pound Sign Problem

Hi Im using

Function GetPage(ByVal URL)
     Dim HttpRequest

     Set HttpRequest = CreateObject("Microsoft.XMLHTTP")
     HttpRequest.Open "GET", URL, False
     HttpRequest.Send
     GetPage = HttpRequest.responseText
End Function

if the file Im loading contains a pound sign "£"  then it appears in GetPage as "?"

But if I view it with a webbrowser component the "£" shows correctly

so what am I doing wrong?

500 points!




NessieBAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkaiosIT DirectorCommented:
The version of Internet Explorer that you are currently using may not support that character.
sakuya_suCommented:
use either £ or £ in that file

also make sure the font set you are using has the sign, some fonts miss out the extra set of letters for some reason
saravananvgCommented:
Hello Sir,

   Kindly check with &#156 for pound symbol

with regards,
padmaja.
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

NessieBAuthor Commented:
sakuya_su

Using HttpRequest as before

The file I download has "?" instead of "£"

so I replace the character once downloaded

Myfile= Replace(MyFile,  "?", "&#163")

then upload the file again.

when I downlaod once more I see "&#163"  not "£"
NessieBAuthor Commented:
By the way the file I am downloading is a text .txt file.
sakuya_suCommented:
ahh text file, the symbol code is only html, btw what you displaying the text onto? some controls cannot display those symbols.

another thing to try, save the text file in unicode, to do that coose unicode in character encoding when u save with notepad
NessieBAuthor Commented:
the question is why does the webbrowser do it correctly but the HTTP does not?
sakuya_suCommented:
the HTTP Control should do it correctly, the question is does the container you are displaying it with support the signs you are trying to use

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NessieBAuthor Commented:
ok I think I understand.

The text file is parsed for various data, one of which it is looking for the "£" symbol.

Once done the edited data is put into a text box.

 Dim HttpRequest

     Set HttpRequest = CreateObject("Microsoft.XMLHTTP")
     HttpRequest.Open "GET", URL, False
     HttpRequest.Send
     GetPage = HttpRequest.responseText

tmp = GetPage

tmp = Replace(tmp, Chr$(10), vbCrLf)
tmp = Replace(tmp, Chr$(34), "")
tmp = Replace(tmp, Chr$(39), "")
tmp = Replace(tmp, "@", "")

if instr(1,tmp,"£")>0 then
do some stuff with the file.
endif

Text1.text = tmp
NessieBAuthor Commented:
can't any body help?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.