🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1463

Re: Indy 9.0.17, URLEncode

#1463
From: Remy Lebeau (TeamB)
Date: Wed, 05 Jan 2005 23:54
27 lines
1823 bytes
"Bill D. Pirkle" <mbpirkle@NOSPAM.att.net> wrote in message
news:41dc435f.54129554@newsgroups.borland.com...

> I'm trying to use URLEncode in Indy 9.0.17 in BCB6.  The Indy
> documentation and examples show it taking only a String, but the
> actual code also requires a "TMetaClass*".

The examples and documentation are based on Delphi, which does not require
the extra parameter.  In C++, the extra parameter is required as part of
BCB's compatibility layer with Delphi, since C++ and Pascal have different
architectures and sementics.

> I've tried this:
<snip>
>   myStr = TIdURI::URLEncode(__classid(TIdURI), myStr);

That is the correct way to do it.

> Both result in a run time popup message:  "Protocol field is empty.".

That is a run-time parsing error, not a compile-time syntax error.  Your
input string is not formatted as a valid URL that URLEncode() can encode
properly.


Gambit
Technical Details
Message-ID: <41dc7df1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41dc435f.54129554@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,99de7357efe5ae14
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <41dc435f.54129554@newsgroups.borland.com>
Subject: Re: Indy 9.0.17, URLEncode
Date: Wed, 5 Jan 2005 15:54:53 -0800
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <41dc7df1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104969201 68.69.17.41 (5 Jan 2005 15:53:21 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail