[resolved] java.lang.RuntimeException: An invalid XML character (Unicode: 0x1)

One Star

[resolved] java.lang.RuntimeException: An invalid XML character (Unicode: 0x1)

I need to store a unicode character in Talend that the target system uses as a separator value in its database.
It's 0x01/U+0001//start of header/^A.
I pasted the character directly into Talend and next time I ran it that job just came up blank (making me think I've lost all my progress!).
I checked the log and found this:
java.lang.RuntimeException: An invalid XML character (Unicode: 0x1) was found in the element content:"^A2^A"
Did some research and found that this character is supported in XML 1.1, but not 1.0 (http://en.wikipedia.org/wiki/Valid_characters_in_XML).
If I manually change the XML version of the item file to 1.1, Talend once again opens the job as blank.
Is there any way to fix this? Work around it?
I'm going to try loading the character from a file on the fly to avoid storing it in Talend's xml file. Even it works it would be ugly, so I'm looking for better solutions.
Thanks!

Accepted Solutions
One Star

Re: [resolved] java.lang.RuntimeException: An invalid XML character (Unicode: 0x1)

Have you tried mapping a string literal in a tMap to your output component? Something like
output_row.SEP_STRING="\u0001"
This should keep the Talend problems away. Are you passing this value along to a database query?

All Replies
One Star

Re: [resolved] java.lang.RuntimeException: An invalid XML character (Unicode: 0x1)

Have you tried mapping a string literal in a tMap to your output component? Something like
output_row.SEP_STRING="\u0001"
This should keep the Talend problems away. Are you passing this value along to a database query?
One Star

Re: [resolved] java.lang.RuntimeException: An invalid XML character (Unicode: 0x1)

Have you tried mapping a string literal in a tMap to your output component? Something like
output_row.SEP_STRING="\u0001"
This should keep the Talend problems away. Are you passing this value along to a database query?

That did it!
Thanks.