You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/07/28 14:34:45 UTC
[camel] branch camel-3.x updated: support more MLLP charsets (#10880)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.x by this push:
new 2476d166b0b support more MLLP charsets (#10880)
2476d166b0b is described below
commit 2476d166b0b78686f549b6a6d36c48bd3f1f6f44
Author: Jonas Beyer <pl...@users.noreply.github.com>
AuthorDate: Fri Jul 28 14:29:11 2023 +0000
support more MLLP charsets (#10880)
---
.../component/mllp/MllpProtocolConstants.java | 27 +++++++++++++++-------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpProtocolConstants.java b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpProtocolConstants.java
index bc01601c8e4..bf838dedf1a 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpProtocolConstants.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpProtocolConstants.java
@@ -44,7 +44,6 @@ public final class MllpProtocolConstants {
MSH18_VALUES = new HashMap<>(15);
MSH18_VALUES.put("ASCII", StandardCharsets.US_ASCII);
MSH18_VALUES.put("8859/1", StandardCharsets.ISO_8859_1);
-
MSH18_VALUES.put("8859/2", Charset.forName("ISO-8859-2"));
MSH18_VALUES.put("8859/3", Charset.forName("ISO-8859-3"));
MSH18_VALUES.put("8859/4", Charset.forName("ISO-8859-4"));
@@ -53,15 +52,27 @@ public final class MllpProtocolConstants {
MSH18_VALUES.put("8859/7", Charset.forName("ISO-8859-7"));
MSH18_VALUES.put("8859/8", Charset.forName("ISO-8859-8"));
MSH18_VALUES.put("8859/9", Charset.forName("ISO-8859-9"));
+ MSH18_VALUES.put("8859/15", Charset.forName("ISO-8859-15"));
+ MSH18_VALUES.put("UNICODE UTF-8", StandardCharsets.UTF_8);
/*
- // These are defined in the HL7 Spec, but I don't know how to map them to Java charset names
-
- MSH18_VALUES.put("JAS2020", "????");
- MSH18_VALUES.put("JIS X 0202", "????");
- MSH18_VALUES.put("JIS X 0201-1976", "????");
- MSH18_VALUES.put("JIS X 0208-1990", "????");
- MSH18_VALUES.put("JIS X 0212-1990", "????");
+ These values are defined in the HL7 Spec, but currently not mapped to a Java charset
+
+ JAS2020
+ JIS X 0202
+ ISO IR6
+ ISO IR14
+ ISO IR87
+ ISO IR159
+ GB 18030-2000
+ KS X 1001
+ CNS 11643-1992
+ BIG-5
+ UNICODE
+ UNICODE UTF-16
+ UNICODE UTF-32
+
+ see: https://terminology.hl7.org/CodeSystem-v2-0211.html
*/
}