You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sergey Livanov <se...@ukrpost.net> on 2003/05/01 21:27:37 UTC

Tomcat i18n

 Please help adjust Tomcat: 

I'm using Struts. The page coding is W1251. When the Cyrillics is entered in the symbol field in ActionClass and Model  multiple ???? pop up instead of Cyrillic characters. ???? also show up in the data base ( Oracle8i  with windows 1251 )
 
Data from CLOb are also coded in the wrong code. But varcher2 data read on the screen (bean:write) in the right coding, i.e. in Cyrillics.

clob read code

     c_lob = rs.getClob(1) ; 			
     hr_buffer = new char[ (int)c_lob.length() ] ; 
     raw_buffer = new byte[ (int)c_lob.length() * 4 ] ; 
     raw_instream = c_lob.getAsciiStream() ; 
     raw_instream.read( raw_buffer ) ; 
     out_buffer = new String( raw_buffer ) ; 			
     raw_instream.close() ;

Thanks .


--
Укрпост - продвинутая почта. http://www.ukrpost.net/
IMAP POP3 NNTP RSSNews Unicode.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat i18n

Posted by "Andre E. Bar'yudin" <ba...@pob.huji.ac.il>.
On Чтв, Май 01, 2003 at 10:27:37 +0300, Sergey Livanov wrote:
>  Please help adjust Tomcat: 
> 
> I'm using Struts. The page coding is W1251. When the Cyrillics is
> entered in the symbol field in ActionClass and Model  multiple ????
> pop up instead of Cyrillic characters. ???? also show up in the data
> base ( Oracle8i  with windows 1251 )

I'm not sure it's Struts-related.  In general, you should specify 

request.setCharacterEncoding("Windows-1251")

or similar before you do any request-parsing.

Regards,

Andre.

-- 
Andre E. Bar'yudin
Home page: http://www.cs.huji.ac.il/~baryudin/


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org