cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From george georgovassilis <>
Subject ESQL, Oracle CLOB and encoding
Date Tue, 02 Nov 2004 09:57:45 GMT
Good morning Dear All

This is a re-post from the users list where unluckily I didn't find a 
solution to my question.
So, appologies for cross-posting.

I've run into trouble with my ESQL page. In detail:
I'm running an Oracle database pool and a few tables in there with CLOBs 
which contain UTF-8 strings.
The following code extracts the data quite nicely:

oracle.sql.CLOB body =  (oracle.sql.CLOB)<esql:get-object column="body"/>;
String xmlbody = (body.length()&gt;0? body.getSubString(1, 

which returns correctly
Το δεύτερο άρθρο στην κατηγορία 'Αγορά / Ελλάδα'

The much more elegant
String stripped = <esql:get-ascii column="body"/>;

however returns garbage:
¤Ώ ΄µΝΔµΑΏ ¬ΑΈΑΏ ΓΔ·½ Ί±Δ·³ΏΑ―± '‘³ΏΑ¬ / •»»¬΄±'

Is there any way I still can use the esql?

Looking forward to your comments

George Georgovassilis

View raw message