We have a problem while viewing the JSON file that contains "\r\n" fetched from DB2 (encoding scheme EBCDIC). When we check the content of the attribute with TOAD directly in the database, we see that we have correct Hex-values for CRLF.
We are fetching this data from DB2 as json format . While viewing the json file it gets converted to the below format
And NotedPadd++(UTF-8) while viewing the JSON "NEL" is being displayed . When i convert the file to ANSI i could notice Â...
I am writing to file as in below code (sample code.)
output = new FileOutputStream(tempFile);
IOUtils.write(getBytes(), output);
public byte[] getBytes() {
String data = "{\r\n" "dataLists" : [ ]}";
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byteArrayOutputStream.write(data.getBytes("UTF-8"));
return byteArrayOutputStream.toByteArray();
}
Please help.