Two Laptop Bag*
The moose likes Spring and the fly likes dealing with non ascii characters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "dealing with non ascii characters" Watch "dealing with non ascii characters" New topic
Author

dealing with non ascii characters

Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

Hey guys,

I'm not sure if I have posted in the right place as my application uses both hibernate, spring and connecting to a mySQL db.

Basically I'm hoping someone can help me as I am having a headache with non ascii characters.
The purpose of the application is to screen scrape. I have a controller which is sent html and from that it will extract certain data and store it to a database.

When the data comes in I use JTidy to clean up the html, before converting it to XML and using Xpaths to get the data I need. This data is then stored in objects which are persisted to the database using hibernate.

The problem comes as some of the data is non ascii, such as ≤¤ĈΗΔΘζ¤≥, this will end up in the database as ???.
However if I use phpMyAdmin to update the database then it will insert fine.

This means it is likely something wrong within the application and not with the database, right?

Both the table and the database are set to utf8.


inside the hibernate.cfg.xml file



in the web.xml, so parameter data should be in utf-8.

I'm stuck guys, not sure what else to try or what to do?

I love this place!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dealing with non ascii characters
 
Similar Threads
Struts1+Hibernate+Tomcat and encoding problem
Character Encoding issue with Tomcat 5.5.9
Spring MVC UTF-8 encoding problem
JSP encoding: ISO-8859 and UTF-8 differences for Spanish characters
Writing Russian characters to XML file