cents symbol corruption

In my xml data I have the � symbol, that’s the cent symbol.

I noticed that as soon as I invoke bytesToString the data then become corrupt. The � symbol adds an additional character to it.

Anyone know what the fix for this might be?

It’s not “corrupted”, per se, rather it is most likely a character encoding issue. What encoding are you using for the bytesToString call?

bytesToString has an encoding parameter. If the bytes where not created using the default encoding the the IS JVM is running with, then you should pass in the encoding used to create the bytes.

If it is XML and the IS XML parser is converting the stream/bytes to String, it will follow the XML rules of looking in the XML prolog for the encoding attribute or default to UTF-8.

hmmm…

the string from the spoke is being encode with the default settings I’m assuming b/c that parameter isn’t being set.

At the hub where I’m receiving this file and I’m using the default encoding again. That hasn’t seemmed to work. So I’ve tried to use different encoding schemes like UTF-8 and some other IANA character sets. However, none of them seem to be working.

Never mind got it to work with UTF-8 I was using UTF-16.

Thank you so much for all the help.

Try ISO-8859-1