iNTERFACEWARE Products Manual > Installing and Using Chameleon > Using Python Scripting > Python Scripting Examples > Message Manipulation > Treating Repeat and Separator Characters as Raw Text |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
Normally, when Chameleon sees the ^, & and ~ characters in a field, it assumes that these characters are the subfield delimiter, sub-subfield delimiter and repeating field delimiter, respectively. However, some applications send these characters as part of their raw text data. If your incoming data contains delimiter characters that you want to treat as raw text, you can use the following Python function to detect delimiter characters and convert them to raw text:
This function can be included as the Global Inbound Script for your VMD file. You can then create a Segment Inbound Script for the field containing the text that you want to convert. This script calls the function defined above:
Note that this function works even if any delimiter character is set to something other than its standard value.
|