aspose file tools
The moose likes Object Relational Mapping and the fly likes Encoding headache 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 » Databases » Object Relational Mapping
Reply Bookmark "Encoding headache" Watch "Encoding headache" New topic
Author

Encoding headache

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3359

Hi.
We are using Spring and Hibernate in our RIA.
Our MySQL 5 database is configured to handle UTF-8
A snippet from applicationContext.xml
[code]
<property name="hibernateProperties">
<props>
<prop key="hibernate.connection.charSet">UTF-8</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.generate_statistics">${hibernate.generate_statistics}</prop>
</props>
</property>
</code]
But when sending Arabic characters to the servlet and trying to save them to the database,they got saved as strange symbols.
On the servlet, I tried every thing: URLDecoder, URLEncoder, setCharacterEncoding
Any ideas?
Spring 2.5
Hibernate 3.2
Ubuntu 7.10
JDK 6
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Encoding headache
 
Similar Threads
testâ„¢ (test with TradeMark symbol) inserting as 'test?' withHibernate and MySQL
Session Factory in Logs
problem with hibernate table mapping.
Attempt to modify an identity column
running before I can crawl ( or how to add Spring to an existing Hibernate standalone app)