[Zope3-dev] Unicode problems

Bjorn Tillenius bjoti777 at student.liu.se
Sat May 29 13:53:15 EDT 2004


There are still some encoding issues in zope.server and zope.publisher

This is how it works now. BTW, when I say [un]quote I mean the use of
urllib's [un]quote function. HTTPRequestParser unquotes the path, so it
gets encoded into utf-8. HTTPTask then sets PATH_INFO, which
PublisherHTTPServer uses to create the request.

According to http://hoohoo.ncsa.uiuc.edu/cgi/env.html PATH_INFO should
be "decoded", which in this context I assume means it should be
unquoted.

Right now, PATH_INFO is unquoted, even though HTTPRequest assumes it is.
But the real problem is that PATH_INFO is encoded with utf-8. Wouldn't it
be better to store it as a unicode string?

One problem with PATH_INFO being utf-8 is that the error service breaks
with unicode urls.

As I see it, HTTPRequestParser should unquote the path and store it as
a unicode string, and HTTPRequest shouldn't try to unquote and decode
it. That would solve the problem, but will it break anything? I'm not
quite sure if something relies on stuff in zope.server being a specific
encoding.

Regards,
  Bjorn



More information about the Zope3-dev mailing list