avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Oliver <kevinoli...@gmail.com>
Subject Re: json encoding/decoding fixed type
Date Tue, 05 Oct 2010 19:37:58 GMT
I think it should be the same as where you got the bytes from. For
example, if you used String.getBytes(String charsetName) to transform
the String to bytes, then it would be charsetName.

On Tue, Oct 5, 2010 at 10:21 AM, Douglas Campbell <deegs_ca@yahoo.com> wrote:
> Having a little trouble doing this in either 1.2 or 1.4.
>
> When I create the TextNode for the fixed data, what encoding should I use for
> the string?
>
> ASCII, UTF-8?
>
> i.e. given a byte[] array
>
> how should I construct the string?
>
> new TextNode(new String(buf, "ASCII"))?
>
> when I use UTF8, the decoding fails complaining that the expected sizes don't
> match.
>
>
>
>

Mime
View raw message