UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position
0: ordinal not in range(128)

This error occur in my application.
I found that my program try to use non-unicode string and this error
occurs.
This error occurs after I update to 1.0.4b6 and modify some of my
application's files
And then I also update cherrypy to 2.3.0.
I use previous stable version of my application to try, it run only on
cherrypy, this problem also occurs.

And I print the incoming data

[Thu Jan 17 11:54:37 2008] [error] '\\xe4\\xb8\\xad\\xe6\\x96\\x87\
\xe6\\xb8\\xac\\xe8\\xa9\\xa6'
[Thu Jan 17 11:54:40 2008] [error] '\\xe4\\xb8\\xad\\xe6\\x96\\x87\
\xe6\\xb8\\xac\\xe8\\xa9\\xa62'

It did not be decoded. I think it should be u'\u4e2d\u6587\u6e2c
\u8a66' some thing like this.
print repr('\xe4\xb8\xad\xe6\x96\x87\xe6\xb8\xac
\xe8\xa9\xa6'.decode('utf-8'))

http://docs.turbogears.org/1.0/Internationalization?highlight=%28decode%29#handling-international-utf-8-form-data
"By default TurboGears uses a CherryPy filter to decode all of the
incoming request parameters into unicode strings using a given
encoding. In most cases you would just keep it that way."

It that something changed in TurboGears make this happen?
Some kind of bug?
Or what mistake I made?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to