Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA9641032F for ; Wed, 3 Dec 2014 19:12:13 +0000 (UTC) Received: (qmail 66254 invoked by uid 500); 3 Dec 2014 19:12:13 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 66203 invoked by uid 500); 3 Dec 2014 19:12:13 -0000 Mailing-List: contact issues-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 issues@camel.apache.org Received: (qmail 66192 invoked by uid 99); 3 Dec 2014 19:12:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2014 19:12:13 +0000 Date: Wed, 3 Dec 2014 19:12:13 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CAMEL-8079) Provide possibility to delegate charset evaluation of a HL7 message to HL7DataFormat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-8079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen reassigned CAMEL-8079: ---------------------------------- Assignee: Claus Ibsen > Provide possibility to delegate charset evaluation of a HL7 message to HL7DataFormat > ------------------------------------------------------------------------------------ > > Key: CAMEL-8079 > URL: https://issues.apache.org/jira/browse/CAMEL-8079 > Project: Camel > Issue Type: New Feature > Components: camel-hl7 > Reporter: Christian Ohr > Assignee: Claus Ibsen > Fix For: 2.14.1, 2.15.0 > > Attachments: PATCH-8079.diff > > > The HL7Codec directly creates a String from the message, using the charset hardcoded in its HL7MLLPConfig. This is too static. > * The field MSH-18 of the message may contain the charset in which the message is encoded (much like encoding=... in the XML header) and which shall be used for decoding. > * Other information nested the exchange may also be usable to derive the appropriate charset if MSH-18 is empty. > The attached patch improves the behavior in a backwards-compatible way. > * HL7MLLPCodec has a new property named "produceString" (default true). If set to false, the codec sends a byte array into the route instead of a string. In this case, no charset is evaluated yet. > * the HL7DataFormat checks the field MSH-18 for the charset to be used for marshalling and unmarshalling. If MSH-18 is empty, it uses the standard Camel charset properties/headers by default. If MSH-18 was populated, the value is copied to a new message header "CamelHL7Charset" > * the HL7DataFormat also offers an extension point in order to "guess" the charset from the byte array content (e.g. using ICU4J's CharsetDetector). -- This message was sent by Atlassian JIRA (v6.3.4#6332)