Re: ACTION-148: responseText and encoding

On Sun, 14 May 2006, Anne van Kesteren wrote:
> 
> reponseText now reads:
> 
>    If the <code><term>readyState</term></code> attribute has a value
>    other than 3 (Receiving) or 4 (Loaded), it MUST be the empty string.

"it" here refers to readyState, which is wrong.

>    Otherwise, it MUST be the fragment of the entity body received so
>    far (when <code>readyState</code> is 3 (Receiving)) or the entity
>    body when <code>readyState</code> is 4 (Loaded)), interpreted as a
>    stream of characters.

"or the complete entity body", or "or the entire body returned" or some 
such would make more sense.

>    If the response includes a <code>Content-Type</code> understood by
>    the UA, with the exception that the rule in the final paragraph of
>    section 3.7.1 of [RFC2616], and the rules in section 4.1.2 of
>    [RFC2046] MUST be treated as if they specified the default character
>    encoding as being UTF-8.

That makes no sense at all. There's a missing verb as far as I can tell.

>    Invalid bytes MUST be converted to U+FFFD
>    REPLACEMENT CHARACTER. If the UA can't derive a character stream in
>    accord with the media type specification, <code>reponseText</code>
>    MUST be <code>null</code>.
> 
> This seems a lot better than how
> http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/#dfn-responsetext reads
> at the moment, but I've the feeling I should add some more references. Perhaps
> [RFC2616] after the first paragraph for entity body etc.?

Doesn't really matter, IMHO. References are important when the reader 
might not know what was being referenced, but for this kind of thing...

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Sunday, 14 May 2006 23:54:25 UTC