RE: CFLOOP problem with commas
Did some research on lists and delimiters and found that ColdFusion will only allow single character delimiters. >From the Known Issues section in the CF5 Enterprise docs "Only single characters may be used as delimiters for lists, etc. ColdFusion Server does not support multi-character delimiters." -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:55 PM To: CF-Talk Subject: RE: CFLOOP problem with commas Huh. Okay. I've never experienced a problem with them. Which isn't to say that no one will. > -Original Message- > From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 4:39 PM > To: CF-Talk > Subject: RE: CFLOOP problem with commas > > > Guys, > > Delimeters that are more than 1 (or 2?) characters don't always work > in my experience. CF kinda just uses 1 character for a delimeter. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFLOOP problem with commas
> As you can see, the first URL outputs normally, but the second URL > breaks at every comma. Is there a way around this? I don't want to > insert Chr() codes if I can help it! Remember that when picking a delimiter, any character is fair game, you can be pretty much assured that something like the BEL character (CHR(7)) or something equally as unprintable isn't going to apear in your list, and if you're paranoid just do a check before using the list and pick another delimiter if it is in use. A handy ascii chart... http://www.asciitable.com --- James Sleeman __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
Tim, Just for reference (concerning the URL Encode/Decode): http://www.foo.com/products/345.html";)> http://www.bar.com/articles/editorials?rfc=435563";)> http://www.foobar.com/cda/4545,4566rc.html?pg=1";)> #URLDecode(ListofUrls)# -Original Message- From: Tim Claremont [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:25 PM To: CF-Talk Subject: CFLOOP problem with commas I am trying to CFLOOP through a collection of URLs. The problem comes from the fact that there are commas in some of the URLs. To illustrate the problem, my code is as follows: http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US &error=novars"> http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=x_main_en,Company= {7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9},varset=Xlang:en_US,varset=Xcntry: USA,varset=prodID:DC220DC"> #ListofUrls# THIS OUTPUTS THE FOLLOWING: http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US&; error=novars http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New Kb=x_main_en Company={7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9} varset=Xlang:en_US varset=Xcntry:USA varset=prodID:DC220DC As you can see, the first URL outputs normally, but the second URL breaks at every comma. Is there a way around this? I don't want to insert Chr() codes if I can help it! __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
Thanks for the help. Ray came through for me for the second time today. Since I *KNOW* that I am looping through URLs, then I *KNOW* that a space is a valid delimiter. I plugged it in and it worked perfectly. Now I can go home on time. Thanks, Ray! __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
How about URLEncodedFormat in, URLDecode out? That way, you can keep your comma as the delimiter. Ryan Kime -Original Message- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:39 PM To: CF-Talk Subject: RE: CFLOOP problem with commas Guys, Delimeters that are more than 1 (or 2?) characters don't always work in my experience. CF kinda just uses 1 character for a delimeter. -mk -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:40 PM To: CF-Talk Subject: RE: CFLOOP problem with commas How are you building your list? You could use a non-URL type character, or a small group of characters, as your delimiter. Something like "~~~" or "|||". > -Original Message- > From: Tim Claremont [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 4:25 PM > To: CF-Talk > Subject: CFLOOP problem with commas > > > I am trying to CFLOOP through a collection of URLs. The problem comes > from the fact that there are commas in some of the URLs. To illustrate > the problem, my code is as follows: > > "http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_ > US > &error=novars"> > > "http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=x_main_en,Compan > y= > {7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9},varset=Xlang:en_US,varset=Xcntry: > USA,varset=prodID:DC220DC"> __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
Huh. Okay. I've never experienced a problem with them. Which isn't to say that no one will. > -Original Message- > From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 4:39 PM > To: CF-Talk > Subject: RE: CFLOOP problem with commas > > > Guys, > > Delimeters that are more than 1 (or 2?) characters don't always work in my > experience. CF kinda just uses 1 character for a delimeter. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFLOOP problem with commas
Personally, I tend to almost always avoid commas. They're really only any good for delimiting lists of integers. Otherwise there'll be trouble sooner or later. I use #RS# which I've defined as Chr(30) earlier with the rest of the constants I define. Once you get used to it, it's much safer. - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, April 24, 2002 8:30 AM Subject: RE: CFLOOP problem with commas > >As you can see, the first URL outputs normally, but the second URL > >breaks at every comma. Is there a way around this? I don't want to > >insert Chr() codes if I can help it! > > > Actually, why not? Normally I don't like this hack because you have to > assume your inserted char doesn't exist, but for URLs, it should be easy > to find a character that is not allowed. Heck, aren't spaces not > allowed? Just use spaces. > > === > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia > > Email: [EMAIL PROTECTED] > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
If you pass N delimiters, CF will treat each one line a different delimiter. Now - I _swear_ I remember writing a REListGet UDF which would allow you to pass a regex (with multiple characters of course) and perform a listgetAt, but I can't seem to fnd it now. Ah - yes, there it is - RESplit (http://www.cflib.org/udf.cfm?ID=424). Not the exact same, but close enough. ;) === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 4:39 PM > To: CF-Talk > Subject: RE: CFLOOP problem with commas > > > Guys, > > Delimeters that are more than 1 (or 2?) characters don't > always work in my > experience. CF kinda just uses 1 character for a delimeter. > > -mk > > -Original Message- > From: Lon Lentz [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 3:40 PM > To: CF-Talk > Subject: RE: CFLOOP problem with commas > > > How are you building your list? You could use a non-URL > type character, or > a small group of characters, as your delimiter. Something > like "~~~" or > "|||". > > > -Original Message- > > From: Tim Claremont [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, April 23, 2002 4:25 PM > > To: CF-Talk > > Subject: CFLOOP problem with commas > > > > > > I am trying to CFLOOP through a collection of URLs. The > problem comes > > from the fact that there are commas in some of the URLs. To > illustrate > > the problem, my code is as follows: > > > > > > "http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&X lang=en_US > &error=novars"> > > "http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=x_main_en,Company= > {7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9},varset=Xlang:en_US,varset=Xcntry: > USA,varset=prodID:DC220DC"> __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
Guys, Delimeters that are more than 1 (or 2?) characters don't always work in my experience. CF kinda just uses 1 character for a delimeter. -mk -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:40 PM To: CF-Talk Subject: RE: CFLOOP problem with commas How are you building your list? You could use a non-URL type character, or a small group of characters, as your delimiter. Something like "~~~" or "|||". > -Original Message- > From: Tim Claremont [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 4:25 PM > To: CF-Talk > Subject: CFLOOP problem with commas > > > I am trying to CFLOOP through a collection of URLs. The problem comes > from the fact that there are commas in some of the URLs. To illustrate > the problem, my code is as follows: > > "http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US > &error=novars"> > > "http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=x_main_en,Company= > {7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9},varset=Xlang:en_US,varset=Xcntry: > USA,varset=prodID:DC220DC"> __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
Tim, I'd just use a different delimeter that cannot exist in a URL - like a space: #ListofUrls# I think I'd scrub the URL first to make sure there is not a space in it. Maybe URLEncode( ) it. -Original Message- From: Tim Claremont [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:25 PM To: CF-Talk Subject: CFLOOP problem with commas I am trying to CFLOOP through a collection of URLs. The problem comes from the fact that there are commas in some of the URLs. To illustrate the problem, my code is as follows: http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US &error=novars"> http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=x_main_en,Company= {7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9},varset=Xlang:en_US,varset=Xcntry: USA,varset=prodID:DC220DC"> #ListofUrls# THIS OUTPUTS THE FOLLOWING: http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US&; error=novars http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New Kb=x_main_en Company={7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9} varset=Xlang:en_US varset=Xcntry:USA varset=prodID:DC220DC As you can see, the first URL outputs normally, but the second URL breaks at every comma. Is there a way around this? I don't want to insert Chr() codes if I can help it! __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
How are you building your list? You could use a non-URL type character, or a small group of characters, as your delimiter. Something like "~~~" or "|||". > -Original Message- > From: Tim Claremont [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 4:25 PM > To: CF-Talk > Subject: CFLOOP problem with commas > > > I am trying to CFLOOP through a collection of URLs. The problem comes > from the fact that there are commas in some of the URLs. To illustrate > the problem, my code is as follows: > > "http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US > &error=novars"> > > "http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=x_main_en,Company= > {7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9},varset=Xlang:en_US,varset=Xcntry: > USA,varset=prodID:DC220DC"> __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
change your delimiter. that should solve the problem. (it's off the top of my head, so could be a little wrong). Shawn Grover -Original Message- From: Tim Claremont [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 2:25 PM To: CF-Talk Subject: CFLOOP problem with commas I am trying to CFLOOP through a collection of URLs. The problem comes from the fact that there are commas in some of the URLs. To illustrate the problem, my code is as follows: http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US &error=novars"> http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=x_main_en,Company= {7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9},varset=Xlang:en_US,varset=Xcntry: USA,varset=prodID:DC220DC"> #ListofUrls# THIS OUTPUTS THE FOLLOWING: http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US&; error=novars http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New Kb=x_main_en Company={7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9} varset=Xlang:en_US varset=Xcntry:USA varset=prodID:DC220DC As you can see, the first URL outputs normally, but the second URL breaks at every comma. Is there a way around this? I don't want to insert Chr() codes if I can help it! __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOOP problem with commas
>As you can see, the first URL outputs normally, but the second URL >breaks at every comma. Is there a way around this? I don't want to >insert Chr() codes if I can help it! Actually, why not? Normally I don't like this hack because you have to assume your inserted char doesn't exist, but for URLs, it should be easy to find a character that is not allowed. Heck, aren't spaces not allowed? Just use spaces. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists