cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Velichko" <v_pe...@ukr.net>
Subject esql:get-ascii
Date Thu, 17 Apr 2003 18:54:08 GMT
Hello all,

My enviroment is jdk1.4.1, tomcat 4.1.18, cocoon 2.0.4, oracle 8.1.7

My DB contains cyrillic symbols in CLOB and in VARCHAR fields.
When I extract the data from VARCHAR by <esql:get-text /> my data is
OK. But when I try to extract the data from CLOB by <esql:get-ascii />
the cyrillic symbols are incorrect.

My CLOB content:
"The site development has been begun!
ъхзщшгнекуцй"

The "sitemap.xmap" snippet:
<map:match pattern="my_match">
  <map:generate src="docs/test.xsp" type="serverpages"/>
  <map:serialize type="xml"/>
</map:match>

The "test.xsp":
<?xml version="1.0"?>
<xsp:page language="java" 
		  xmlns:xsp="http://apache.org/xsp" 
		  xmlns:esql="http://apache.org/cocoon/SQL/v2">
<html>
<body>
  <esql:connection>
    <esql:pool>mypooldb</esql:pool>
    <esql:execute-query>
	<esql:query>
	  select t.myclob, t.myvarchar
	  from mytesttable t
	  where t.document_id=2
	</esql:query>
	<esql:results>
	  <table border="1">
	    <esql:row-results>
	      <tr>
		<td><esql:get-ascii column="myclob"/></td>
		<td><esql:get-string column="myvarchar"/></td>
	      </tr>
	    </esql:row-results>
	  </table>
	</esql:results>
	<esql:no-results><p>Sorry, no results!</p></esql:no-results>
	<esql:error-results><p>Errors</p></esql:error-results>
      </esql:execute-query>
    </esql:connection>
  </body>
</html>
</xsp:page>

The situation is reproduced either my DB is created with characterset windows-1251 or with
characterset UTF-8.

Could you please explain to me what is wrong?  

-- 
Best regards,
Peter Velychko
v_peter@ukr.net

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message