Announcement

Collapse
No announcement yet.

Message encoding problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Message encoding problem

    I'm trying to do simple transfer from text file containing HL7 message (encoding UTF-8) to identical outbound text file with the same message and the same encoding.

    I set channel with FileListener as a source and FileWriter as an destination. I chose UTF-8 encoding for both of them. In outbound template i put only reference to raw data (${message.rawData}).
    Message:
    PID||89102332546^^^^PESEL|17741||G??l?^?ó???||19791023|M|||Street 8 m 4^^City^^93218|||||||||
    is transfered to:
    PID||89102332546^^^^PESEL|17741||G??l?^?ó???||19791023|M|||Street 8 m 4^^City^^93218|||||||||
    Written file contains changed data (polish signs are changed to '?' sign). I've also tried other encodings (like ISO-8859-2) but result is the same: ? instead of polish signs (??????).

    Is it possible to transfer HL7 messages containing language specific signs?


    Please refer to attached source HL7 message (UTF-8, Polish signs in PID.5).

    ORM_UTF8.hl7 (593 bytes)

    Post edited by: mombip, at: 08/14/2007 08:11

  • #2
    Re:Message encoding problem

    What encoding is used in JavaScript edit windows (transformers). Each polish sign is being changed to '?' sign after channel save. Is that replacement intended? Can I control it? Maybe it is possible to do some custom Mirth compilation from source code?

    Any suggestions will be appreciated.

    Comment


    • #3
      Re:Message encoding problem

      It looks like it is Mirth Database encoding problem. Setting derby.serviceLocale
      from en_US to pl_PL (in /Mirth/mirthdb/service.properties) fixed problem with polish chars.

      One problem still appears. XML parser parses 'ó' sign to '& oacute':
      Code:
      <PID.5><PID.5.1>'G''&# 281;''&# 347';'l& #261';</PID.5.1><PID.5.2>'&# 379';'& o a c u t e';'&# 322';'&# 263';'&# 324';</PID.5.2></PID.5>
      I added spaces to avoid char translations.
      That causes following transformer error:
      Code:
      ERROR-300: Transformer error
      ERROR MESSAGE:	Error evaluating transformer
      com.webreach.mirth.model.converters.SerializerException: org.xml.sax.SAXParseException: The entity "oacute" was referenced, but not declared.
      	at com.webreach.mirth.model.converters.ER7Serializer.fromXML(ER7Serializer.java:157)
      	at com.webreach.mirth.model.converters.ER7Serializer.fromXML(ER7Serializer.java:50)
      ...
      It seems like XML parser settings problem. Any suggestions?

      Post edited by: mombip, at: 08/20/2007 05:48

      Comment


      • #4
        Re:Message encoding problem

        Are you using 1.6?
        Chris Lang

        Comment


        • #5
          Re:Message encoding problem

          No. I'm using 1.5.0.2272. Should I use 1.6 (I didn't know that it is already released )

          Comment


          • #6
            Re:Message encoding problem

            WOW. It seems that problem doesn't exist in version 1.6.
            Anyway change in Mirth database locale settings is necessary.

            Thank you.

            Comment

            Working...
            X