What data types are you using in your Thrift definition?

If you use the String type, and don't wrap in ByteBuffer, you should get
unicode strings on the Java side. Are you manually wrapping up your
strings in a ByteBuffer? A ByteBuffer should not come into play unless you
are using the binary type, which is intended not to do any unicode
handling and just treat everything as raw bytes.

Cheers,
Mark

On 8/3/12 12:50 AM, "Tushar Sudake" <[email protected]> wrote:

>Hi,
>
>I'm performing some performance experiments with Thrift based Server and
>Client.
>The server is written in Java, while Client is written in C++.
>
>What server does is returns "Sting Bytes" wrapped in Java's "ByetBuffer"
>object.
>
>This works fine with non-unicode data. But when  data contains unicode
>Strings, client Receives OR Reads (I'm not sure which one is it) corrupted
>unicode data (like '?').
>
>So my question is is there any specific way needed to handle unicode data
>with Thrift?
>
>I'm very new to Thrift and can't provide much technical details. (I
>haven't
>written both client, server :) )
>
>
>Any help would be greatly appreciated.
>
>Thanks,
>Tushar Sudake

Reply via email to