cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Velychko <v_pe...@ukr.net>
Subject Re[2]: esql:get-ascii (cyrillic data)
Date Tue, 22 Apr 2003 08:37:48 GMT

Many thanks!
I'll try just now.

YM> On Mon, 21 Apr 2003 18:10:39 +0300
YM> "Peter Velichko" <v_peter@ukr.net> wrote:

>> Hello all,
>> 
>> I have a problem with retrieving the data from CLOB field by esql.
>> My enviroment is jdk1.4.1, tomcat 4.1.18, cocoon 2.1 (the same is in the cocoon 2.0),
oracle 8.1.7.
>> 
>> My DB data are encoded with the "Cp1251" characterset (NLS_CHARACTERSET and NLS_CHARACTERSET
are set to &#8220;CL8MSWIN1251&#8221;). (But the same situation is for the DB with
the characterset
>> &#8220;UTF8&#8221;)
>> The data obtained from the text fields (VARCHAR2) are represented correctly by cyrillic
symbols. But the data obtained from the CLOB are not correct. They are replaced by another
symbols. F.e. the
>> data from CLOB "абвгд" are changed to "01234".
>> 
>> My sitemap snippet:
>> <map:match pattern="about">
>> <map:generate src="test_document.xsp" type="serverpages"/>
>>       <map:serialize type="xml"/>
>> </map:match>
>> 
>> My &#8220;test_document.xsp&#8221; is the following:
>> <?xml version="1.0"?>
>> <xsp:page language="java" 
>>                 xmlns:xsp="http://apache.org/xsp" 
>>                 xmlns:esql="http://apache.org/cocoon/SQL/v2">
>> <doc>
>>       <esql:connection>
>>               <esql:pool>myconnection</esql:pool>
>>               <esql:execute-query>
>>                       <esql:query>
>>                               select t.clobdata, t.varchardata 
>>                               from testtable t
>>                               where t.document_id=2
>>                       </esql:query>
>>                       <esql:results>
>>                                       <esql:row-results>
>>                                               <from_clob>
>>                                                       <esql:get-ascii column="clobdata"/>
>>                                               </from_clob>
>>                                               <from_varchar>
>>                                                       <esql:get-string column="varchardata"/>
>>                                               </from_varchar>
>>                                       </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>
>> </doc>
>> 
>> The variant with <esql:get-string column="clobdata&#8221;/> instead of
<esql:get-ascii &#8230;/> gives the same result.
>> 
>> Please advise what must I do to get correct data.
>> 

YM> Try use <esql:get-clob/> instead of <esql:get-ascii/>




-- 
Best regards,
 Peter                            mailto: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