Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

UTF-8 Encoding problem  RSS feed

 
Vaibhav Rane
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Everyone ,

Have below problem for which i seek solution.
I am trying to fetch a value stored in oracle db column which has Japanese currency symbol Yen ¥. However value when fetched is distorted. It gets converted in ?. Witnessed in logs and db column when same is stored.
Application is deployed on tomcat and has spring and hibernate with OS as Unix.

At first i thought issue is with hibernate. However when i tried a sample standalone program with spring-hibernate layer and run it on unix, it correctly fetched and printed correct Yen value.
So program outside tomcat runs fine but when deployed on tomcat the conversion doesnt happen correctly.

My questions are
a) Does tomcat has any encoding settings that gets applied to the application and would override other settings i.e if provided in hibernate (properties) or jdbc level (properties at url).
b) What is the best practice for making multilayered application UTF-8 compliant.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!