From glim at mycybernet.net Mon Jan 24 19:16:00 2005 From: glim at mycybernet.net (glim@mycybernet.net) Date: Mon Jan 24 19:15:25 2005 Subject: [Nh-pm] Yet Another Perl Conference North America 2005 announces call-for-papers Message-ID: YAPC::NA 2005 (Yet Another Perl Conference, North America) has just released its call-for-papers; potential and aspiring speakers can submit a presentation proposal via: http://yapc.org/America/cfp-2005.shtml The dates of the conference are Monday - Wednesday 27-29 June 2005. The location will be in downtown Toronto, Ontario, Canada. (Note that a different date block was previously announced, but has been moved to accomodate venue availability.) The close of the call-for-papers is April 18, 2005 at 11:59 pm. If you have any questions regarding the call-for-papers or speaking at YAPC::NA 2005 please email na-author@yapc.org We would love to hear from potential sponsors. Please contact the organizers at na-sponsor@yapc.org to learn about the benefits of sponsorship. Other information regarding the conference (e.g. venue, registration specifics) will be announced soon. We look forward to your submissions and a great conference! From rgacote at AppropriateSolutions.com Mon Jan 31 08:55:02 2005 From: rgacote at AppropriateSolutions.com (Ray Cote) Date: Mon Jan 31 08:55:42 2005 Subject: [Nh-pm] Oddity with URI::Escape Message-ID: I must be missing something here... While building an HTTP query string, I'm escaping the data being passed in the query portion. For example, I need to turn the following: http://www.example.com/?company=A&B Jones+1 into: http://www.example.com?company=A%26B%20Jones%2B1 The &, +, and space are all escaped. Now, when I run the following test code on our Linux box: #include URI::Escape; print 'A&B Jones+1'; I get: A%26B%20Jones%2B1 When I run the same thing on any of our Windows machines, I get: A&B%20Jones+1 If I look at the URI::Escape.pm module (v3.13 1999/03/20 gisle) I see a default $escapes string built containing hex representations of all the character values from 0 thru 255. The uri_escape subroutine in escape.pm checks to see if a pattern is being passed in (I'm not) and, if there is no pattern, it moves to the section of code where a regular expression translates the "Default unsafe characters." If I look in the substitution string, I most definitely see the '&' character. So it should be substituted. But it is not! I've now run this on two different Windows boxes. I'm obviously missing something. Any ideas as to what? As a side note, the Python encoding routines are working just fine on those Windows machines. -- Raymond Cote Appropriate Solutions, Inc. PO Box 458 ~ Peterborough, NH 03458-0458 Phone: 603.924.6079 ~ Fax: 603.924.8668 rgacote(at)AppropriateSolutions.com www.AppropriateSolutions.com From clark_k at pannaway.com Mon Jan 31 10:32:09 2005 From: clark_k at pannaway.com (Kevin D. Clark) Date: Mon Jan 31 10:32:25 2005 Subject: [Nh-pm] Oddity with URI::Escape In-Reply-To: (Ray Cote's message of "Mon, 31 Jan 2005 11:55:02 -0500") References: Message-ID: What do you get when you run the following on both your Linux and Windows boxen? perl -l -MURI::Escape -e 'print "A&B Jones+1";' perl -l -MURI::Escape -e 'print uri_escape("A&B Jones+1");' Just trying to understand the problem here, --kevin -- GnuPG ID: B280F24E And the madness of the crowd alumni.unh.edu!kdc Is an epileptic fit -- Tom Waits From morbus at disobey.com Mon Jan 31 10:35:02 2005 From: morbus at disobey.com (Morbus Iff) Date: Mon Jan 31 10:35:13 2005 Subject: [Nh-pm] Oddity with URI::Escape In-Reply-To: References: Message-ID: <41FE7A56.808@disobey.com> > perl -l -MURI::Escape -e 'print "A&B Jones+1";' > perl -l -MURI::Escape -e 'print uri_escape("A&B Jones+1");' > A&B Jones+1 > A%26B%20Jones%2B1 Fedora Core 3. > Just trying to understand the problem here, You didn't describe it, but I assert the above is the right output. -- Morbus Iff ( you are nothing without your robot car, NOTHING! ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus From clark_k at pannaway.com Mon Jan 31 13:07:22 2005 From: clark_k at pannaway.com (Kevin D. Clark) Date: Mon Jan 31 13:07:34 2005 Subject: [Nh-pm] Oddity with URI::Escape In-Reply-To: (Ray Cote's message of "Mon, 31 Jan 2005 11:55:02 -0500") References: Message-ID: Maybe the "unsafe" list associated with URI::Escape::uri_escape() is munged somehow on your win32 box? What does this produce on both of your platforms?: #!/bin/perl -w use URI::Escape; print uri_escape("A&B Jones+1", "^A-Za-z0-9\-_.!~*'()"); __END__ Please show us the output, --kevin -- GnuPG ID: B280F24E And the madness of the crowd alumni.unh.edu!kdc Is an epileptic fit -- Tom Waits From rgacote at AppropriateSolutions.com Mon Jan 31 13:09:44 2005 From: rgacote at AppropriateSolutions.com (Ray Cote) Date: Mon Jan 31 13:10:05 2005 Subject: [Nh-pm] Oddity with URI::Escape In-Reply-To: References: Message-ID: Well, I'll be darned. It _is_ the library. When I upgrade from my installed 3.13 version of Escape.pm to the 3.28 version, my problem goes away. Looking through the change log, I see this back on 2001-08-27: URI::Escape::uri_escape default has changed. Reserved characters are now escaped when no second argument is provided. Guess I should still go back through the old code and figure out why _some_ of the characters were escaped since the above would imply nothing should have been escaped. Meanwhile, everything is working fine. Thanks to everyone who took a few minutes to think about this. --Ray -- Raymond Cote Appropriate Solutions, Inc. PO Box 458 ~ Peterborough, NH 03458-0458 Phone: 603.924.6079 ~ Fax: 603.924.8668 rgacote(at)AppropriateSolutions.com www.AppropriateSolutions.com From bill at bfccomputing.com Mon Jan 31 20:05:39 2005 From: bill at bfccomputing.com (Bill McGonigle) Date: Mon Jan 31 20:05:46 2005 Subject: [Nh-pm] Oddity with URI::Escape In-Reply-To: References: Message-ID: <88BE74DA-7406-11D9-B8F6-000D93541084@bfccomputing.com> On Jan 31, 2005, at 16:09, Ray Cote wrote: > URI::Escape::uri_escape default has changed. Reserved characters are > now escaped when no second argument is provided. > > Guess I should still go back through the old code and figure out why > _some_ of the characters were escaped since the above would imply > nothing should have been escaped. Being that & and + were causing you trouble: & is used for separating GET variables (?foo=bar&fred=barney) and + is munged by some webservers to space (%20) - frequently the cause of much consternation with my plus-expanded e-mail addresses (bill+whatevermailbox@bfccomputing.com). So maybe that's why they were reserved. ?, / and : might also have been on the list? Just a guess... -Bill ----- Bill McGonigle, Owner Work: 603.448.4440 BFC Computing, LLC Home: 603.448.1668 bill@bfccomputing.com Cell: 603.252.2606 http://www.bfccomputing.com/ Page: 603.442.1833 AIM: wpmcgonigle Skype: bill_mcgonigle