Encoding Issues with XML translated to HL7

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Encoding Issues with XML translated to HL7

  • Creator
    Topic
  • #55398
    Dustin Schreader
    Participant

      We have just upgraded from Cloverleaf 5.7 to 6.1.2.  I have a thread that receives xml messages encoded in windows-1252 and may contain Spanish characters.  I have an xlate, which translates the XML to HL7 using an XSD, which specifies windows-1252 encoding.  Both the inbound and outbound thread has encoding set to windows-1252.  Prior to the upgrade from 5.7 to 6.1.2 we had no issues with receiving and sending these Spanish characters but since the upgrade to 6.1.2 the inbound messages still contain the windows-1252 encoded Spanish characters but in the outbound messages the Spanish characters are being converted from windows-1252 to utf-8, e.g.

    Viewing 0 reply threads
    • Author
      Replies
      • #85177
        Rob Abbott
        Keymaster

          Hi Dustin

          You must specify the correct character encoding in the protocol thread settings.  For the inbound thread, it sounds like windows-1252.

          Do you know what character encoding the receiving system is expecting?  Set this correctly and it should get the characters it’s looking for.

          As you note, the engine expects to be processing UTF-8 except at protocol boundaries.

          Cloverleaf will perform the encoding automatically given the correct settings.  If you try to do this yourself with Tcl you may corrupt the data (as everything in the engine needs to be UTF-8).  Likewise any data you look at inside the engine (in Tcl, etc) would be UTF-8.

          so:

          Code:

          sending system (windows-1252) | engine (UTF-8) | receiving system (???)

          The bars in the above diagram are the cloverleaf protocol connections – the encoding is performed automatically here based on the protocol encoding setting.   Inbound encodes from 1252 to UTF-8, outbound encodes from UTF-8 to ???.

          Rob Abbott
          Cloverleaf Emeritus

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.