GAE for Python 1.7.0
I am trying to pass chinese characters to the URL so that handlers
recognize them through regular expressions.
the regular expression is
CH_RE = u'[⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〺〻㐀-䶵一-鿃豈-鶴侮-頻並-龎]'
Hopefully the regular expression catches as follows
app = webapp2.WSGIApplication([('/?', MainPage), ('/_edit' + CH_RE,
> EditPageHandler)]
I tried an URL
http://localhost:8092/鶴
But it gives an error,
404 Not Found
> The resource could not be found.
The log shows
INFO 2012-07-23 07:10:34,546 dev_appserver.py:2952] "GET /%E9%B6%B4
> HTTP/1.1" 404 -
I am a little confused. It looks like I need to encode the given URL so
that the regular expression can at least read it.
The AppEngine seems to automatically execute percent encoding through the
process.
It is hard to determine what to ask you all, but I believe that the problem
is passing encoded URL to the main function.
The question is how and where in the code do I need to specify the encoding
process?
I apologize for such a disorganized question, but I appreciate if anyone
points out the problem more specifically.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/rPNpgGb1qOYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.