Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-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 0E25618021 for ; Wed, 15 Jul 2015 10:19:39 +0000 (UTC) Received: (qmail 33524 invoked by uid 500); 15 Jul 2015 10:19:38 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 33476 invoked by uid 500); 15 Jul 2015 10:19:38 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 33461 invoked by uid 99); 15 Jul 2015 10:19:38 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jul 2015 10:19:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 237751A6FF1 for ; Wed, 15 Jul 2015 10:19:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 6pgzmLVxzzAx for ; Wed, 15 Jul 2015 10:19:37 +0000 (UTC) Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 3D16143DDB for ; Wed, 15 Jul 2015 10:19:37 +0000 (UTC) Received: by igbij6 with SMTP id ij6so67492931igb.1 for ; Wed, 15 Jul 2015 03:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tL2SBtEooCPhnDl6hrPUXSY/AHSnUkzz/7fgqNCCs5E=; b=gcb/ggfJQh3kIxAjNtKcKapfFZ/Y1Rpm/dWOUYMDpoQ/CJZBTyQB6EaR4C2Ps1+EZ9 48AcdEqD687B1T0RIVu69MT5EbUS6JvIcSFM/lc4I6ZJLuLbo6LEegIa9ABvkH4QVRZ/ upvhcy27mZT/nK2dpySIEjoa3VR94q1yb2jXZgG3tli+8w/Y5ol+N4DggOsTsEo8xdNr gm30YM6nRpt150e4NxXuIQigOEqL4adjCpHaquhqfj6jqSY+fajhIyjPd5DHA7d37EtZ lIYeMe1Y3TNpw5CFxkVZOhQfkPfIQuXzrMiecPl75Mu1ul3yyLopOcwQN+Ykl9y/jDFw LcyA== MIME-Version: 1.0 X-Received: by 10.107.11.155 with SMTP id 27mr4059663iol.121.1436955576888; Wed, 15 Jul 2015 03:19:36 -0700 (PDT) Received: by 10.36.84.140 with HTTP; Wed, 15 Jul 2015 03:19:36 -0700 (PDT) Date: Wed, 15 Jul 2015 12:19:36 +0200 Message-ID: Subject: Concerning https://issues.apache.org/jira/browse/CAMEL-8905 Encoding Problems in JSONPath From: Franz Paul Forsthofer To: dev@camel.apache.org Content-Type: text/plain; charset=UTF-8 Hi, I made a suggestion to overcome some charset encoding problems in the jsonpath component. See https://issues.apache.org/jira/browse/CAMEL-8905.The idea is to automatically determine the encoding if the json document has a unicode encoding (UTF8, UTF-16LE, UTF-16BE,UTF-32BE, UTF-32LE). This is done according to the specification given in RFC 4627. However, if the encoding is not a unicode encoding, then the encoding cannot be determined. In order also to cover the non-unicode case, I introduced a camel header where the user can set the encoding. So the logic is that if the camel header is set the encoding from the header is used. If the header is not set then the automatic determination will be executed. If the automatic determination cannot find an encoding UTF-8 is used. If nobody has objections against this procedure, I will check-in this correction. Regards Franz