hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Sutton" <adrian.sut...@ephox.com>
Subject Re: Character Encodings
Date Fri, 07 Mar 2003 12:05:49 GMT
Oleg,
Thanks for your responses, I'm confident that I'll be writing the right
information now. :)

> Kalnichevski, Oleg wrote:
> >> 6. Some document types specify the charset inside the document
> >> itself, you should consult the appropriate standards to determine
> >> whether to use the charset specified in the HTTP response or the
> >> charset in the document.
>
> Can you give examples of such document formats?

HTML and XML are examples of this.  In the case of XML (perhaps just for
WebDAV, not sure) the HTTP header should override what the document
specifies.  I'm under the impression that for HTML, the encoding specified
in the document is used first but that may be either wrong or just by
convention rather than by standard.

> > HttpClient is not supposed to be aware of any body content specific
> > stuff. It is HttpClient consumer's responsibility to ensure that the
> > content is properly decoded
>
> This is generally true. HttpClient should only provide means to make
> this step as easy as possible.

Agreed, and with the new (or at least new to me) getContentCharSet,
getResponseCharSet and getRequestCharSet methods, that's all HttpClient
should be expected to do.  I simply plan to add a note in the docs that the
charset specified by the server may not match the charset specified in the
document and you need to have a policy for dealing with that.

For the record, the user guide I'm working on has the following structure:

Authentication Guide (done)
Character Encodings
Cross Host Redirects (done)
Logging Guide (kindly completed by Jeff Dever)
Methods Reference
    Options (done)
    Get
    Head
    Post
    Multipart Post
    Put
    Delete
    Trace
Sample Code (done - just a link to the sample code directory in CVS, later
it might be worth adding a page describing each of the examples)
Trouble Shooting (done)
Tutorial (done - simple walkthrough that shows the basic approach to using
HttpClient and winds up building a tiny app that GET's a web page)


I've also consolidated the developer documentation a big into the beginnings
of a developer guide which includes links off to the various pages on
contributing to Apache projects and then Jeff's Release Guide and Oleg's
WebApp Test HowTo.

Then I guess it's just a matter of monitoring the mailing lists for frequent
questions and documenting them in a FAQ or adding an article to the user
guide.

I'll probably upload another bundle to the bugzilla bug later tonight for
people to take a look at and provide feedback on, but any feedback on the
structure is welcome.

Adrian Sutton.


Mime
View raw message