Hi Peter,

if the naming is the only issue, you could use a typedef. AFAIK there are no 
plans to extend Thrift in this direction yet. Another idea could be 
transporting the string data via binary, but that makes ot necessary to have 
conversion routines, making everything more complicated.

I will answer your other mail later today in more detail. I did not overlook it 
:-)

Have fun,
JensG
________________________________
Von: Peter Neumark
Gesendet: 14.10.2014 09:36
An: dev@thrift.apache.org
Betreff: Re: unicode types

I'd prefer not to use "string" types in my thrift files, since that doesn't
say anything about the encoding.
Instead, I'd like the following:

struct JpegData {
    1: optional binary exif,
    2: *utf8* filename,
    3: i32 bytes
}

The thrift wire format has support for unicode fields:
https://github.com/apache/thrift/blob/master/lib/py/src/Thrift.py#L39

But the IDL doesn't let me use them directly for some reason.
My question is, are there plans to support the example thrift struct
definition above?

Thanks,
Peter

On Tue, Oct 14, 2014 at 9:13 AM, Jens Geyer <jensge...@hotmail.com> wrote:

> Hi Peter,
>
> They need to be interoperable between all platforms an lggs. Somewhere in
> the docs UTF8 is mentioned, IIRC. Is that what you ask for?
>
> ________________________________
> Von: Peter Neumark
> Gesendet: 13.10.2014 22:59
> An: dev@thrift.apache.org
> Betreff: unicode types
>
> Hi all,
>
> Looking at the wire format's type IDs, it's clear that thrift supports
> several thrift encodings in it's wire format, yet the IDL does not allow
> one to speak of string encoding (string/binary are the only type names in
> the IDL).
>
> Is this a design decision (where each language implementation can choose
> the appropriate Unicode type id for encoding strings), or is there some
> historical reason for not exposing string encoding options in the thrift
> IDL?
>
> Thanks,
> Peter
>
> --
>
> *Peter Neumark*
> DevOps guy @Prezi <http://prezi.com>
>



--

*Peter Neumark*
DevOps guy @Prezi <http://prezi.com>

Reply via email to