Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 585F5714E for ; Thu, 14 Jul 2011 18:38:24 +0000 (UTC) Received: (qmail 19755 invoked by uid 500); 14 Jul 2011 18:38:22 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 19417 invoked by uid 500); 14 Jul 2011 18:38:21 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 19401 invoked by uid 99); 14 Jul 2011 18:38:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jul 2011 18:38:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jul 2011 18:38:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DCD04573DF for ; Thu, 14 Jul 2011 18:37:59 +0000 (UTC) Date: Thu, 14 Jul 2011 18:37:59 +0000 (UTC) From: "Miki Tebeka (JIRA)" To: dev@avro.apache.org Message-ID: <996782747.14491.1310668679901.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (AVRO-860) Invalid JSON when printing out records with unicode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Invalid JSON when printing out records with unicode --------------------------------------------------- Key: AVRO-860 URL: https://issues.apache.org/jira/browse/AVRO-860 Project: Avro Issue Type: Bug Components: java Affects Versions: 1.5.1 Reporter: Miki Tebeka I have an avro file, that when printed returns invalid JSON. The code for iterating and printing is: {code} DatumReader reader =3D new GenericDatumReader(); DataFileReader dataFileReader =3D new DataFileReader(data, reader); while (dataFileReader.hasNext()) { System.out.println(dataFileReader.next().toString()); } {code} and the relevant JSON snippet is {code} "description": "Move=E2=84=A2 offers advertisers the opportunity to del= iver messages to consumers at a time when consumers are making the biggest = purchases of their lives\uMOVE=E2=84=A2 OFFERS ADVERTISERS THE OPPORTUNITY = TO DELIVER MESSAGES TO CONSUMERS AT A TIME WHEN CONSUMERS ARE MAKING THE BI= GGEST PURCHASES OF THEIR LIVES=E2=80=94OR REMODELING, REDECORATING AND MAIN= TAINING THEIR MOST IMPORTANT ASSETS.or remodeling, redecorating and maintai= ning their most important assets.", {code} (The \uMOVE is the problematic part). However if I do: {code} GenericRecord record =3D dataFileReader.next(); Utf8 desc =3D (Utf8)record.get("description"); System.out.println(desc); {code} Then I get {code} Move=E2=84=A2 offers advertisers the opportunity to deliver messages to con= sumers at a time when consumers are making the biggest purchases of their l= ives=E2=80=94or remodeling, redecorating and maintaining their most importa= nt assets. {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira