Hi
I'm facing a strange problem after having migrated a java/servlet application from
Tomcat 5.5 to
JBoss EAP 4.3.
Below is a code snippet which performs a
string comparison:
...
if (stateCode.toUpperCase().equals("P�G�ENDE_EJ_KONTAKT")) return CaseStateCache.getInstance().getById(CaseState.STATE_INPROG_NOT_CONTACTED);
...
log.warn("Unknown state found in database:" + stateCode);
return CaseStateCache.getInstance().getById(CaseState.STATE_UNKNOWN);
And the log output is:
"...WARN [CaseDAO] Unknown state found in database:P�G�ENDE_EJ_KONTAKT..."
In the above, stateCode is read from an SQL Server 2000 (but should be irrelevant to this since the correct chars are written to the log file)
For you who can't read swedish characters, the string that stateCode is compared against and the state in the log, contains swedish characters (eg. å, ¨ and ö)
So , since the log shows that state spelled correctly, my suspicion is now that this might be due to some encoding and string comparison (that might differ from the encoding used when writing log to file), but I'm happy to receive your opinions and advice in this
Regards
/R