This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Unicode Problem in Struts using dom4j for xml parsing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unicode Problem in Struts using dom4j for xml parsing" Watch "Unicode Problem in Struts using dom4j for xml parsing" New topic
Author

Unicode Problem in Struts using dom4j for xml parsing

Ranveer K Kumar
Ranch Hand

Joined: Sep 13, 2009
Posts: 64
Hi All,

I am facing problem related to UTF-8.
I am using dom4j for generating xml in struts 1.3.

My xml document carry some non English character (Hindi).
Now the problem is when I am generating xml using dom4j in core java. Then Hindi character is coming.
But when using with struts then becoming junk (like : ???).
The problem I am unable to understand.
my environment is following:
OS : windows 7
IDE : Eclipse
java version : 1.6
Struts version : 1.3

I am using servlet filter to encode the request to UTF-8.

Same code is working while using in core java (using main method).
please help.

Ranveer K Kumar

Thank
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unicode Problem in Struts using dom4j for xml parsing