THRIFT-395. python: Add option to treat strings as UTF-8 unicode
authorDavid Reiss <dreiss@apache.org>
Thu, 1 Jul 2010 05:36:25 +0000 (05:36 +0000)
committerDavid Reiss <dreiss@apache.org>
Thu, 1 Jul 2010 05:36:25 +0000 (05:36 +0000)
commit95c005a7c69d106591202cfa6eded6354608b307
tree1096e7708186dc192f06f49b3691b6ab6395d187
parent623594749c76f65bf964a5dc517128f207d25b42
THRIFT-395. python: Add option to treat strings as UTF-8 unicode

Add the "utf8strings" option to the Python generator.  If set, all
Thrift strings (not binary) will be expected to be unicode objects, not
str.  They will be encoded as UTF-8 before serialization and decoded as
UTF-8 after deserialization.

The accelerator module for TBinaryProtocol is not affected.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@959516 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_py_generator.cc