On Tue, 2008-12-30 at 13:34:14 +0100, Wichert Akkerman wrote:
> I am trying to use unicode URLs and routes, but as far as I can see
> routes does not quite support this at the moment: generating a route
> with a non-ascii component fails (see
> http://routes.groovie.org/trac/routes/ticket/85) and incoming requests
> data is return as ASCII strings, not decoded unicode strings. This
> contradicts the routes manual
> (http://routes.groovie.org/manual.html#unicode) which appears to say
> this should work fine.
> 
> Is anyone using unicode routes succesfully? Is there a trick that I'm
> missing somewhere?

Well, I've solved similar problem using iri_to_uri function from
webhelpers before fetching Unicode data to redirect_to:

http://docs.pylonshq.com/thirdparty/webhelpers/util.html#webhelpers.util.iri_to_uri

I'm not sure about routes documentation, but AFAIK URIs can't have any
character above ASCII set, so they must be encoded properly.

-- 
Audrius Kažukauskas

Attachment: pgp1KNihVSSFE.pgp
Description: PGP signature

Reply via email to