Reply To: How to catch multiple hexa char in HL7 msg and replace it ?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to catch multiple hexa char in HL7 msg and replace it ? Reply To: How to catch multiple hexa char in HL7 msg and replace it ?

#58283
Charlie Bursell
Participant

    An easier method might be something like:

    Assume the string is in a variable called str

    if {[regsub -all — {[^x00-x7F]} $str

                                    {\x0[format %02x [scan & %c]]} tmp]} {

       set str [subst $tmp]

    }

    If the string has non-ascii characters they get converted, else not