> I wish I could specify all the unicode letters (for all other
> languages apart from Turkish) as something like \w.
Best thing I've come up with is to go over the unicode list and
identify which languages you want to support. You then use unichr to
construct a regex such as: '[%s-%s]' % (unichr
> (r'^(?P[-0-9A-Za-z]+)/(?P[-_.0-9A-Za-zıİğĞüÜşŞöÖçÇ ]
> +)/$', 'search_in_all_packages')
> then
> (u'^(?P[-0-9A-Za-z]+)/(?P[-_.0-9A-Za-zıİğĞüÜşŞöÖçÇ ]
> +)/$', 'search_in_all_packages').encode("utf-8")
>
> but none of them worked.
[Typo: misplaced .encode("utf-8") in mail.]
I managed t
> > You need to replace the `\w` with something that will match the characters
> > you
> > want. If you want everything that `\w` matches plus spaces, you should use
> > `[\w ]+` (note the space) instead of `\w+`.
What about other unicode characters? Such as special characters in
other languages
Awesome thanks. I love the Django community.
On Jun 11, 7:03 pm, Thomas Sutton wrote:
> Hi Andy,
>
> 2009/6/12 Andy Dietler :
>
>
>
>
>
>
>
> > Right now I've got a URL pattern that works for letters and numbers,
> > but when a character like %20 gets thrown in it fails.
>
> > The pattern is th
Hi Andy,
2009/6/12 Andy Dietler :
>
> Right now I've got a URL pattern that works for letters and numbers,
> but when a character like %20 gets thrown in it fails.
>
> The pattern is this:
>
> (r'^(?P\w+)/$', 'detail'),
>
> Which works when I have:
>
> domain.com/Friends/
> domain.com/24/
>
> bu
Right now I've got a URL pattern that works for letters and numbers,
but when a character like %20 gets thrown in it fails.
The pattern is this:
(r'^(?P\w+)/$', 'detail'),
Which works when I have:
domain.com/Friends/
domain.com/24/
but not for
domain.com/The%20Office/
How do I get it to acc
6 matches
Mail list logo