You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hiloliddin Karimov <HK...@central.nbu.com> on 2002/08/09 15:32:45 UTC

Encoding on ESQL query

Hi All,
 
I try retrieve column that have cyrillic letters by ESQL:
 
<?xml version="1.0" encoding="windows-1251"?>
<xsp:page ...
...
  <esql:query>
    SELECT username FROM users 
    WHERE fname LIKE <esql:parameter>%<xsp-request:get-parameter
name="fname"/>%</esql:parameter>
  </esql:query>
...
 
and fname has cyrillic letter, so, when I try retrieve some record, no
results.
How I know it should to encode.
 
Any ideas, tips, or help would be greatly appreciated.
Thanks very much!
Hill
 
MS SQL; Tomcat 4.0; Cocoon 2.1 dev; Java SDK 1.4;

Re: Encoding on ESQL query

Posted by yuryx <yu...@mobicomk.donpac.ru>.
Hiloliddin Karimov wrote:

> Hi All,
>
>  
>
> I try retrieve column that have cyrillic letters by ESQL:
>
>  
>
> <?xml version="1.0" encoding="windows-1251"?>
>
> <xsp:page ...
>
> ...
>
>   <esql:query>
>
>     SELECT username FROM users
>
>     WHERE fname LIKE <esql:parameter>%<xsp-request:get-parameter name="fname"/>%</esql:parameter>
>
>   </esql:query>
>
> ...
>
try
<xsp-request:get-parameter name="text1" form-encoding="windows-1251"/>
or
String param=new 
String(request.getParameter("text1").getBytes("ISO-8859-1"),"windows-1251");

Regards.
Yury.

>  
>
> and fname has cyrillic letter, so, when I try retrieve some record, no 
> results.
>
> How I know it should to encode.
>
>  
>
> Any ideas, tips, or help would be greatly appreciated.
>
> Thanks very much!
>
> Hill
>
>  
>
> MS SQL; Tomcat 4.0; Cocoon 2.1 dev; Java SDK 1.4;
>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>