Raghuveer wrote:
I am working on Struts ,SAP-JCO .
This is i18n application running on Tomcat.
I have designed my application in UTF8 charset.
When Saving the polish characters from application they are saved into SAP
Database properly.
Before Saving i am doing following String modifications.
The same code doesn't work on Tomcat Server on Windows English System.Here
the Polish characters( aeclónszz ) are saved as #########.
What would be cause for this.
What changes i need to do in my code to work on both English And Polish
Windows (Tomcat Server)
--------------------
strConvertedMessage = new String(strText.getBytes("UTF8"), "UTF8");
inputTable.setValue(strConvertedMessage,"TABLENAME");
That string conversion is redundant. You are saying "convert this string
into a sequence of bytes in UTF-8 and then interpret those bytes as
UTF-8 to construct a new string." Assuming strText is not null,
strText.equals(strConvertedMessage) is garanteed true.
There are a number of places where character set conversion can get
messed up. It may be right up front when accessing the request
parameters, during propagation into your SAP database, on retrieval from
the database, or during output (assuming you're not doing something bad
with the data in between those points).
Start by figuring out exactly where the mis-encoding occurs; that should
tell you which input/output boundary to concentrate on.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]