[ https://issues.apache.org/jira/browse/THRIFT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689464#action_12689464 ]
Jonathan Ellis commented on THRIFT-395: --------------------------------------- Wrong. Python 2 has a strong tradition of using the str type for _ascii_ strings as well as blobs. That continues to work fine with this patch. Python 2 has always used the unicode type for unicode strings. Passing random binary stuff that may or may not be the result of encoding a unicode object to something expecting a unicode string (and i mean generically not specifically the unicode type) will crap out. Try it with sqlalchemy or mako or any modern unicode-supporting python 2 library. > Python library + compiler does not support unicode strings > ---------------------------------------------------------- > > Key: THRIFT-395 > URL: https://issues.apache.org/jira/browse/THRIFT-395 > Project: Thrift > Issue Type: Bug > Components: Compiler (Python), Library (Python) > Reporter: Jonathan Ellis > Assignee: Jonathan Ellis > Priority: Blocker > Fix For: 0.1 > > Attachments: python-utf8-v2.patch, python-utf8.patch > > > Effectively, all strings in the python bindings are treated as binary strings > -- no encoding/decoding to UTF-8 is done. So if a unicode object is passed > to a (regular, non-binary) string, an exception is raised. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.