• Post Reply Bookmark Topic Watch Topic
  • New Topic

dealing with non ascii characters  RSS feed

Sean Clark
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!