I am facing an issue with encoding of the file written on IS folder . The logic is that we have a XML string of ISO-8955-2 encoding which we are writing on IS using bytesToFile build in service(encoding as IS-8955-2).
So when we open the file on Internet Explorer , word & XML notepad it works as expected but if we open the same file on TextPad & XML marker the data gets messed up .
In case any one has had such issue can you please suggest a solution.
We even tried using custom java code to write the byte stream on IS still we are facing the same issue.
A java.lang.String is always in UTF-8 encoding. When creating a string from bytes, one specifies the encoding used to create the bytes, so that they can be properly interpreted and converted to UTF-8 when creating the string object.
For the reverse, you get bytes from a string and specify a particular byte encoding. Such as ISO-8955-2.
Quite likely is that TextPad is unable to support/display that encoding. Thus, most likely your file is okay. It is simply a display issue. But that’s just a guess.
“…& XML marker the data gets messed up”
Can you elaborate on what is meant exactly by “messed up?”
Does ISO-8955-2 exist? I’ve searched a number of things and cannot find any meaningful reference to it. Do you mean ISO-8859-2 (Latin chars for Eastern Europe languages)?