From: Doug M. <do...@cr...> - 2000-11-30 20:12:34
|
Yay. thanks. (as if I didn't think of replacing the +' THEN decoding..) <hits self in forehead with a resounding "DOH!"> Thank you, Doug Melvin Integrated System Solutions: Design, Development, Implementation and Support Creative-Workshop.com ----- Original Message ----- From: "Dougal Campbell" <do...@gu...> To: "dynapi-help" <dyn...@li...> Sent: Thursday, November 30, 2000 11:26 AM Subject: Re: [Dynapi-Help] Escape and Unescape.. (or server.urlencode) > On Thu, 30 Nov 2000, Doug Melvin wrote: > > > Could someone please direct me to a chart or list of some sort > > showing exactly what characters are replaced with what codes when > > you Escape a string (encode it so it can go into a URL and is cross > > platform..) . > > > > You see.. my application combines JS and ASP.. unfortunatly the two > > don't escape/unescape strings quite the same way.. I've gottewn it > > to the point where , when the strings get's to javascript and is > > unescaped all is well except that all the spaces are +'s .. I CAN do > > a .replace() except, well, what if one or more of those +'s are > > actually ment to BE +'s? > > How about replace()ing the +'s first, *then* do the urldecode? (Real +'s > should have been encoded as %2B, I think). > > URL encoding just escapes certain characers by converting them to the > hexadecimal equivalent of their ASCII value, preceded by a percent > sign. From RFC 1738, it looks like encoded characters are: > > Control characters: octets 00-1F, >=7F > Special characters: <>"#%;/?:@=& > > Optionally, these might also be encoded: {}|\^~[]` > > It doesn't specically say that '+' should be encoded, but since the > urlencoding scheme uses it in place of spaces, you should assume that it > will be encoded as %2B > > -- > Ernest MacDougal Campbell III, MCP <do...@gu...> > http://www.gunters.org/~dougal/ > Lumber Cartel Unit #1654 (tinlc): http://come.to/the.lumber.cartel/ > "The medium is not the message. The *message* is the message." > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help |