character encoding problem

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf character encoding problem

  • Creator
    Topic
  • #52759
    David Barr
    Participant

      We’re trying to do an upgrade to 5.8 and having problems related to character encoding.

      For the particular problem I working on now, I have a UPOC protocol thread that uses TCL to read a PDF into a string, then we use “msgset” to put the data into a message. This is corrupting the PDF data.

      We’ve got one ugly workaround, but I’d like to come up with something better. My workaround involves using TCL to write the message back out to a len10 encoded file and using “msgread” to set the message instead of “msgset”.

      I saw an earlier message (link) in the forum  that I suspect is related to our issue.

      We’re trying to get support from McKesson on this issue (because that’s who we’re paying for support) but they aren’t being very helpful on this issue.

    Viewing 0 reply threads
    • Author
      Replies
      • #75405
        frans de Wet
        Participant

          Here’s a simple way to get around the undesired encoding conversion:

          37

          38 encoding system identity

          39             foreach file [glob -nocomplain “$path/*.pdf”] {

          40  set pdfmsg [read_file -nonewline $file]

          41 #               set pdffp [open $file]

          42 #               fconfigure $pdffp -translation binary -encoding binary

          43 #               set pdfmsg [read $pdffp]

          44 #               close $pdffp

          Setting the system encoding to ‘identity’ disables encoding conversions as you are asserting that the encoding in the file is the same as the native encoding of the system.

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