Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Special characters in XML barcode content

Avatar

Level 2

Hello,

I made a barcoded form with a custom script that creates a custom XML as barcode content.

The decoding happens well when the user write plain text in the text fields, but whenever it inputs some special characters (for XML syntax), like ",<,>,=,etc... the content of barcode it is decoded as:

<barcode>

<!CDATA[... true content ...]>

</barcode>

how can I handle this situation?

I have to handle what the user writes or I have to change the decode activity?

Thank you very much for your support!

Fabio

4 Replies

Avatar

Former Community Member

Fabio,

First and foremost I would recommend avoiding encoding a PaperForms barcode with XML, unless it is absolutely required.

I would not have expected this result with invalid XML but rather a run-time error.

Is this ES 8.x or ES2 (9.0)? I tested decoding invalid XML in ES2 and my process results in a run-time error.

Steve

Avatar

Level 1

Hi,

My case is also about special characters. I am using delimited PaperForms barcode. Occasionally, the user enters some unicode characters, and the decoding process returns something like '&#132423;&#132575;&#147397;&#13;'. Is there any way to enforce Barcoded Forms ES2 to return me unicode?

Best regards,

Tim

Avatar

Former Community Member

Tim,

Yes. You can set the character encoding in the barcode in LiveCycle Designer ES2 to UTF-8, UTF-16, UCS-2, ISO-8859-1, etcetera. On the decode side, the Decode operation in the BarcodedFormService supports a similar list of encodings in the CharSet drop-down in the Input properties.

Steve

Avatar

Level 1

Steve,

I have already encoded decode operation in UTF-8. In form level, because it is an acrobat form, no option to choose the encoding as in LC Designer. In further tests, if I change the extractToXML output to XDP instead of XFDF, then I will receive data rather than &# sequence. It is strange. Don't understand why XDP and XFDF would give out different encoding.

Tim