george georgovassilis wrote:
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, (int)body.length()):"");


which returns correctly
<snip>
ÎÎ ÎÎÏÏÎÏÎ ÎÏÎÏÎ ÏÏÎÎ ÎÎÏÎÎÎÏÎÎ 'ÎÎÎÏÎ / ÎÎÎÎÎÎ'
</snip>

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

however returns garbage:
<snip>
ÂÎ ÎÂÎÎÂÎÎ ÂÎÎÎÎ ÎΠÎÂÎÂÂÎÎâ 'âÂÎΠ/ âÂÂÂÎÂ'
</snip>

Is there any way I still can use the esql?

Without looking at the code esql:get-ascii implies ascii encoding ...but you are talking about uft-8 encoding. maybe that's the problem.

Compare the esql:get-object and esql:get-ascii
implementations in the esql.xsl.

cheers
--
Torsten

Reply via email to