This content has been marked as final. Show 1 reply
Solution found, I'll post the work around to those who might encounter the same problem.
Somewhere in the layers of technology (webwork or weblogic I'd guess), the servlet response is encoded into UTF-8 regardless. The encoding in the database was ISO-8859-1. Sending ISO encoded bytes by UTF-8 caused the conflicting character codes (anything above 127) to show up as undefined.
The fix is to decode the input byte array into ISO-8859 string, then encode that string into UTF-8, which can be send by Weblogic.
isoConvert = new String(buf, "ISO-8859-1");
out.write(isoConvert.getBytes("UTF-8"), 0, isoConvert.getBytes("UTF-8").length);