cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joseph <pjos...@gmail.com>
Subject Fwd: facing an odd problem with a Unicode character
Date Thu, 28 Jul 2011 11:58:55 GMT
I saw this related post (and have tried everything it suggests to no avail).

http://www.mail-archive.com/ojb-user@db.apache.org/msg07314.html

-------- Original Message --------
Subject: 	facing an odd problem with a Unicode character
Date: 	Thu, 28 Jul 2011 07:50:37 -0400
From: 	Paul Joseph <pjoseph@gmail.com>
To: 	users@cocoon.apache.org



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


Mime
View raw message