You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Joseph <pj...@gmail.com> on 2011/07/28 13:50:37 UTC
facing an odd problem with a Unicode character
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.
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org