cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joseph <>
Subject facing an odd problem with a Unicode character
Date Thu, 28 Jul 2011 11:50:37 GMT
Hi there,

I am using Cocoon 2.11, Java 6, Apache Tomcat and Postgresql, and using 
OJB to talk to the database which is encoded in UTF-8.

Everything has been working fine till this problem of "en-dash" cropped up.

All the database calls such as dao.getObject(myBean, "myField", 
"Clinical – Reference") work perfectly.

(Note that the dash above is an "en-dash").

It also displays in all the Cforms forms correctly.

However, my simple getter is not able to handle the "en-dash" i.e. if I 
go myBean.getMyField() I would expect it to return the string "Clinical 
– Reference".

However, it returns "Clinical ? Reference" (note the question mark 
replaced the en-dash)

The only reason I can think of why the seemingly more complex JDBC and 
SQL calls all work correctly, but not the simple getter method is 
because perhaps I am using OJB to map my class to the database table?

My repository maps myField to a VARCHAR.

Would anyone know if OJB mappings need anything special to tell it is a 
UTF-8 database?

Thanks in advance.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message