This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes Spring and the fly likes dealing with non ascii characters Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply 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://jrebel.com/download
 
subject: dealing with non ascii characters
 
Similar Threads
Writing Russian characters to XML file
Character Encoding issue with Tomcat 5.5.9
JSP encoding: ISO-8859 and UTF-8 differences for Spanish characters
Spring MVC UTF-8 encoding problem
Struts1+Hibernate+Tomcat and encoding problem