I am troubled with this specific problem with special characters.
The server (installed on Linux) which raises XML feed and sends for further processing. Problems are harvested when MBI processes special characters that are '??' Mark. There is only one code available in local dev and QA server that works fine Although the OS version, the Tomato version is all the same as the part of the code that reads the XML feed and sends it to a JMS Q Pasted:
StringBuffer article = new string buffer (); InputStreamReader = NewestSTream Reader (new file inputstream (pending file), "UTF-8"); Int data; While ((data = Reid ())! = -1) {article.append ((four) data); } is close(); Is = null; Log.debug ("Read in \ n" + article.toString ()); {Js.writeTextMessage (article.toString (), "server", hostname, processor); } Hold (jmxexception j) {log. Terror ("JMS Exception:" + JEG Message ()); // server maybe close it Stop (); Return; } The above code reads the file from "pending file", adds it to stringbuff, posts the file in a log and in the JMS queue Log file displays special charas ?? XML feed with special characters in 'Only In Prod' is as follows:
We tried to do all those possibilities which include the following:
- URI encoding to the server for utf-8. XML in Tomcat
- The LANG environment variable has been validated on en_US.UTF-8 Linux.
- It has been verified that the XML file has the default encoding in the form of UTF8 without BOM.
We are unable to detect that the reason is with the Tomcat server or Linux OS. help please.
Do not log the article string as text only. Dump each character as hex integer, in this way you can tell whether it is logging which is failing, or reading which is failing.
It is not clear to me that JMR queue behaves - is it just logging which is failing, or even JMS?
Comments
Post a Comment