<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Re: [Seaside] is there url encoding in Seaside or Squeak?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Really? I use existing encoding to pass URLs to Flash components via vars and never noticed needing to change encoding to include underscore and period chars as it worked just fine so far.<BR>
<BR>
Cheers!<BR>
<BR>
-Boris<BR>
(Sent from a BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org &lt;seaside-bounces@lists.squeakfoundation.org&gt;<BR>
To: Seaside - general discussion &lt;seaside@lists.squeakfoundation.org&gt;<BR>
Sent: Wed Oct 03 04:50:34 2007<BR>
Subject: Re: [Seaside] is there url encoding in Seaside or Squeak?<BR>
<BR>
<BR>
On Oct 3, 2007, at 12:30 PM, Stuart Herring wrote:<BR>
<BR>
&gt; On 9/30/07, Merik Voswinkel &lt;merik@mac.com&gt; wrote:<BR>
&gt;&gt; My mistake because I was looking for something to encode the whole<BR>
&gt;&gt; url, not one character.<BR>
&gt;&gt; After two hours I have found what I was looking for: String&gt;&gt;&gt;<BR>
&gt;&gt; encodeForHTTP encodes the whole string:<BR>
&gt;&gt;<BR>
&gt;&gt; xmlUrl := xmlUrl encodeForHTTP.<BR>
&gt;&gt;<BR>
&gt;&gt; But it does not encode all (just like Seaside), it does not encode<BR>
&gt;&gt; the '_' and the '.' as you can see from this result:<BR>
&gt;&gt;<BR>
&gt;&gt; xmlPath%3Dhttp%3A%2F%2Fwww.macmerik.nl%3A9090%2Fseaside%2Ftests%<BR>
&gt;&gt; 2Ffacade%3F14%26_k%3DzllSchmY%26_s%3DqzSqkxyQfMWoNLdV<BR>
&gt;&gt;<BR>
&gt;&gt; So I will rewrite it to encode those characters as well, like the<BR>
&gt;&gt; tool at <A HREF="http://www.dommermuth-1.com/protosite/experiments/encode/">http://www.dommermuth-1.com/protosite/experiments/encode/</A><BR>
&gt;&gt; index.html .<BR>
&gt;&gt; This tool is written in Flash and does encode the '_' and '.'&nbsp; also.<BR>
&gt;&gt; I need the conversion Flash uses because it is for passing url's with<BR>
&gt;&gt; FlashVars to Flash.<BR>
&gt;&gt;<BR>
&gt;&gt; The question that remains is why some characters are not encoded and<BR>
&gt;&gt; others are.<BR>
&gt; Why would you encode '_' or '.'?&nbsp; They have no special meaning in a<BR>
&gt; URL or in HTTP and they both fall within the 7 bit ASCII character set<BR>
&gt; as standard printable characters.<BR>
&gt; Encoding them would produce a needlessly long URL and waste CPU cycles<BR>
&gt; at both ends.<BR>
<BR>
It is what FlashVars demand (I think it is typical of Adobe Flash, i&nbsp;<BR>
vastly prefer Open Source Flash)<BR>
<BR>
&gt;<BR>
&gt;&gt; From the RFC you quoted above:<BR>
&gt;&nbsp;&nbsp;&nbsp; Thus, only alphanumerics, the special characters &quot;$-_.+!*'(),&quot;, and<BR>
&gt;&nbsp;&nbsp;&nbsp; reserved characters used for their reserved purposes may be used<BR>
&gt;&nbsp;&nbsp;&nbsp; unencoded within a URL.<BR>
&gt;<BR>
&gt; '_' and '.' are explicitly mentioned as not needing to be encoded<BR>
&gt;<BR>
It still must be done, i tested it. Flashvars is not documented so&nbsp;<BR>
this is how you must find out.<BR>
I have it running and implemented a special encodeForHTTPandFlashVars<BR>
<BR>
&gt;&gt; From your examples it's apparent that you don't want _every_&nbsp;<BR>
&gt;&gt; character<BR>
&gt; encoded as you're not expecting the standard alpha-numeric characters<BR>
&gt; to be encoded, so why underscore and full-stop?<BR>
<BR>
Again, it must be so as the tests prove.<BR>
<BR>
Merik<BR>
_______________________________________________<BR>
Seaside mailing list<BR>
Seaside@lists.squeakfoundation.org<BR>
<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
</FONT>
</P>

</BODY>
</HTML>