W3C home > Mailing lists > Public > public-appformats@w3.org > September 2006

Re: WF2: application/x-www-form-urlencoded encoding ill-defined

From: Mark Nottingham <mnot@yahoo-inc.com>
Date: Thu, 7 Sep 2006 09:07:57 -0700
Message-Id: <3F0902D5-20B3-4C03-AB93-CDFA302AF5C3@yahoo-inc.com>
Cc: public-appformats@w3.org
To: Bjoern Hoehrmann <derhoermi@gmx.net>

On 2006/09/05, at 6:47 PM, Bjoern Hoehrmann wrote:
>
> This text is rather unclear and incorrect; it does not define what  
> non-
> alphanumeric characters are (and whatever it means, it's incorrect),

The best way to fix this would be with direct references to RFC3986's  
BNF.

You'd probably want to encode anything that doesn't match the  
unreserved rule, adding parts of the reserved rule depending on the  
context (i.e., if it's in a query arg, you can allow sub-delims, ":",  
"@", "/" and "?"; if it can appear in a path segment, you have to  
percent-encode the last two).


> the
> character encoding is applied to the whole string, not just non-alpha-
> numeric characters,

Sort of. The input to the function is a unicode string; it doesn't  
have any encoding. Then, the characters which need to be percent- 
encoded (see above) are serialised as UTF-8 and the resulting bytes  
are percent-encoded and inserted as characters. Then, the entire  
thing is serialised as a UTF-8 string (unless the WG wants to allow  
other encodings; I don't have the context handy).

Cheers,

--
Mark Nottingham
mnot@yahoo-inc.com
Received on Thursday, 7 September 2006 16:08:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:20 GMT