Special characters created in an XML file not visible by scanner

johnchr

New Member
I am communicating XML files containing variables for a label file that is pre-stored on our printer. This label contains a data matrix, and in that data matrix should be embedded a string. The printer takes care of the embedding, I simply need to fill in the variable in the XML file which I create with java. I am sending this XML file directly to the printer IP and port and it works properly. My only issue comes when I attempt special characters. These special characters, are the group separator, the record separator, and the end of transmission character. They appear correctly when the generated XML file is opened in Firefox, they appear as boxes (unreadable characters) when the string is printed in java. First the representations of the characters I am already using:Record separator = "\u241E"Group separator = "\u241D"End of Transmission character = "\u2404"In java I've been embedding the strings as such:\[code\]"<variable name=\"UID\">"+"[)>06"+"\u241E"+"17V"+"3CSS4"+"\u241D"+"1P"+partNumber+"\u241D"+"S"+serialNumber+"\u241E"+"\u2404"+"</variable>"\[/code\]The problem occurs when the data matrix containing this variable is scanned, these record and group separators are not showing up, it's as if they do not exist outside of java and the XML file. My question is: Should I be doing something else other than java strings to make these visible? Should I be using hex representations? Binary representations? I've tried a few already, none seem to take, java and xml treat them as strings (i.e. "&29;" for record separator has not worked).Thanks in advance for any help you can give me.
 
Back
Top