Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "dealing with non ascii characters" Watch "dealing with non ascii characters" New topic

dealing with non ascii characters

Sean Clark

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:
subject: dealing with non ascii characters
It's not a secret anymore!