Article View: borland.public.cppbuilder.internet.socket
Article #2688Re: URLEncode and Unicode
From: Peter Evans
Date: Wed, 08 Feb 2006 11:06
Date: Wed, 08 Feb 2006 11:06
34 lines
2023 bytes
2023 bytes
"Hamid" wrote in message news:43dc6a15$1@newsgroups.borland.com...
>
> I'm using TNMURL to encode a url, but seemingly the component fails to
> encode urls containing Unicode characters. How can I solve the problem?
>
> Thanx
>
Hamid,
I made the following work OK, but it uses CppWebBrowser1->Navigate, from
NetMasters, to pull the page in !
//make wide string from the URL that has been read in from
file
//get space, and calc length
wchar_t wcURL[256+1]; int iURL=2*strlen((const
char*)csURL)+1;
//
//change to wide / BSTR
StringToWideChar((String)csURL,wcURL,iURL);
//
//load down the first page of the website
CppWebBrowser1->Navigate(wcURL);
Incidentally, the following seems to work without problem as well:
CppWebBrowser1->Navigate(L"AnyPieceOfGoodHtml.html");
Hope that helps.
Best regards,
Peter Evans.
Technical Details
Message-ID:
<43e9cfd9$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<43dc6a15$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,7fe0fd91d449167c X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Peter Evans" <peter-evans@pelcaro.com> From: "Peter Evans" <peter-evans@pelcaro.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <43dc6a15$1@newsgroups.borland.com> Subject: Re: URLEncode and Unicode Date: Wed, 8 Feb 2006 11:06:20 -0000 Lines: 36 Organization: - X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 217.158.9.102 Message-ID: <43e9cfd9$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1139396569 217.158.9.102 (8 Feb 2006 03:02:49 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail