[ 
https://issues.apache.org/jira/browse/THRIFT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694911#action_12694911
 ] 

David Reiss commented on THRIFT-395:
------------------------------------

@Kevin: I think a brand new type is overkill what would you think of...
 - Committing support for annotations on base types (THRIFT-413)?
 - Committing something to my patch for alternate encodings in Java 
(THRIFT-414).
 - Stating that strings should be UTF-8 by convention unless otherwise 
specified.
 - Defining a "unicode.strict" attribute that we could implement on a 
per-language basis as it becomes convenient.  In Python, strs would be verified 
when writing and decode into unicodes when reading.  In Ruby and PHP, we could 
validate the encoding on both sides (and throw an exception if validation 
fails).  In C++, maybe we could use wstring and encode/decode with ICU if 
unicode.string is set to "omg yes really even C++ jerk!"

> Python library + compiler does not support unicode strings
> ----------------------------------------------------------
>
>                 Key: THRIFT-395
>                 URL: https://issues.apache.org/jira/browse/THRIFT-395
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python), Library (Python)
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.1
>
>         Attachments: 
> 0001-python-Minor-cleanup-of-protocols-don-t-use-str.patch, 
> 0002-THRIFT-395.-python-Phase-One-of-support-for-unicode.patch, 
> 0003-THRIFT-395.-python-Phase-Two-of-support-for-unicode.patch, 
> 0004-python-Remove-ridiculous-semicolons-from-gen-code.patch, 
> 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.

Reply via email to