[英]HL7 HAPI - Unicode character \E appearing?
I'm making a character conversion to unicode using Java, sometimes I get a character "\\E" in the converted String, what does this character mean? 我正在使用Java将字符转换为Unicode,有时在转换后的String中得到字符“ \\ E”,此字符是什么意思? - I searched and could not find an answer.
-我搜索了,找不到答案。
This is a nice unicode converter: https://r12a.github.io/apps/conversion/ 这是一个不错的unicode转换器: https : //r12a.github.io/apps/conversion/
And this page has all the codes: https://unicode-table.com 并且此页面包含所有代码: https : //unicode-table.com
This is the java code I used in case it might help: 这是我使用的Java代码,以防万一:
String conc = String.format ("\\u%04x", (int)charArray[i]);
字符串conc = String.format(“ \\ u%04x”,(int)charArray [i]);
All your backslashes are getting escaped to \\E\\ as this is the escape sequence used in HL7 for a backslash character. 您的所有反斜杠都将转义到\\ E \\,因为这是HL7中用于反斜杠字符的转义序列。
For more information on escape sequences used for special characters in HL7 you can refer to this link: https://corepointhealth.com/resource-center/hl7-resources/hl7-escape-sequences/ 有关HL7中用于特殊字符的转义序列的更多信息,您可以参考以下链接: https : //corepointhealth.com/resource-center/hl7-resources/hl7-escape-sequences/
I found the answer so I'm sharing it for anyone who comes across a similar problem. 我找到了答案,所以我将它分享给遇到类似问题的任何人。 I was using HAPI - an HL7 lib for Java- which has a particular behavior of escaping the / with a /E when converting xml to a HL7v2 message, as the default seperator is the slash "/", that's why I was getting all the /E's.
我使用的是HAPI-Java的HL7库-在将xml转换为HL7v2消息时,它的特殊行为是使用/ E转义/,因为默认的分隔符是斜杠“ /”,这就是为什么我得到所有/ E的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.