You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Kevin Clark (JIRA)" <ji...@apache.org> on 2009/04/02 10:02:13 UTC

[jira] Issue Comment Edited: (THRIFT-395) Python library + compiler does not support unicode strings

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

Kevin Clark edited comment on THRIFT-395 at 4/2/09 1:01 AM:
------------------------------------------------------------

One of the Ruby guys here. *waves*

@David: As things are now, no, I don't think Ruby should enforce string encoding. Right now the format the string is expected to be in should be published as part of api specs and handled application side. 'string' is a semantic label in our case, distinct from binary in that it is assumed to be characters, but doesn't define encoding. What I would be in favor of is a new utf8 type, which *would* define encoding. But without that, I don't think the restriction should be placed on string.

@Jonathan: If your api method takes an integer, but in your application the only valid values are even numbers, should we include that validation in Thrift as well? ;) Hostage taking seems a little extreme. I prefer to think of it as the boyscout helping the old lady across the street, but not making sure she has two legs. If it doesn't bother her, it doesn't bother me.

      was (Author: kclark):
    One of the Ruby guys here. *waves*

@David: As things are now, no, I don't think Ruby should enforce string encoding. Right now the format the string is expected to be in should be published as part of api specs and handled application side. 'string' is a semantic label in our case, distinct front binary in that it is assumed to be characters, but doesn't define encoding. What I would be in favor of is a new utf8 type, which *would* define encoding. But without that, I don't think the restriction should be placed on string.

@Jonathan: If your api method takes an integer, but in your application the only valid values are even numbers, should we include that validation in Thrift as well? ;) Hostage taking seems a little extreme. I prefer to think of it as the boyscout helping the old lady across the street, but not making sure she has two legs. If it doesn't bother her, it doesn't bother me.
  
> 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.