Previously Audrius Kažukauskas wrote:
> 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

That should work, but it's a workaround for something routes already
claims to support. I'ld rather have routes fixed :)

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

URIs can be UTF-8 with standard URL %-escaping - most browsers will
decode (and encode) that automatically and show the unicode string in
the address bar. That is especially important for languages with a
non-latin character set: without this URLs are horrible for them.

Wichert.

-- 
Wichert Akkerman <wich...@wiggy.net>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to