[whatwg] Question about the application/x-www-form-urlencoded encoding algorithm

NARUSE, Yui naruse at airemix.jp
Wed Jan 20 23:29:41 PST 2010


In 4.10.19.4 URL-encoded form data, The
application/x-www-form-urlencoded encoding algorithm,
it says:

> For each character in the entry's name and value, apply the following subsubsteps:
>
> If the character isn't in the range U+0020, U+002A, U+002D, U+002E,
> U+0030 to U+0039, U+0041 to U+005A, U+005F, U+0061 to U+007A
> then replace the character with a string formed as follows:
> Start with the empty string, and then, taking each byte of the character
> when expressed in the selected character encoding in turn,
> append to the string a U+0025 PERCENT SIGN character (%) followed
> by two characters in the ranges U+0030 DIGIT ZERO (0) to
> U+0039 DIGIT NINE (9) and U+0041 LATIN CAPITAL LETTER A
> to U+0046 LATIN CAPITAL LETTER F representing the hexadecimal value
> of the byte (zero-padded if necessary).
>
> If the character is a U+0020 SPACE character, replace it with a single U+002B PLUS SIGN character (+).

This means, U+9670, encoded as "¥x89¥x41" in Shift_JIS, must be
encoded as "%89%41",
and shouldn't be "%89A"?

thanks,

-- 
NARUSE, Yui
naruse at airemix.jp


More information about the whatwg mailing list