Sylvain wrote:
> Currently if you do that in production (it works with the SDK) :
> logging.debug("% is connected" % user) and 'user' contains a non ascii
> char (i.e. Fran�oise,...) --> GAE crash
>
> It's impossible to do that too :
> except Exception, e
>     logging.error(e)
> If e.message contains a non ascii char --> crash

Your basic problem is that Python uses the ASCII codec by default when
implicitly converting byte strings to unicode strings or vice versa.
It doesn't know what encoding your using, so if you're using something
else you need to explicitly convert the string yourself.

You can try converting your strings to Unicode before logging them.
For example:

   logging.debug(u"%s is connected" % user.decode("uft8"))

This may however just move the problem somewhere else.

                              Ross Ridge

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to