Re: Can a handler return UTF-8?

Neil Schemenauer <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
On Thu, Aug 18, 2005 at 04:06:57PM +0100, Hamish Lawson wrote:
> Wrapping the output in "unicode()" cures this, but is there some
> way I can tell Quixote to accept UTF-8?

>From http://www.amk.ca/python/howto/unicode:

    "Software should only work with Unicode strings internally,
    converting to a particular encoding on output."

As David says, the best course of action is would be to change
HTTPResponse._encode_chunk.  For example:

    import quixote.http_response
    quixote.http_response._encode_chunk = lambda chunk: chunk

HTH,

  Neil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.