You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by "Altuğ Altıntaş (Koç.Net)" <al...@koc.net> on 2000/12/13 19:33:11 UTC

charset problem

Hi all . 

I have got two jsp pages . In the first one I write Turkish chars
(ISO-8859-9) and post it to my second page .
In my second jsp page , 
	1 ) i get paramaters from my first page which are turkish chars and
show it . 
	2 ) i fetch  data  from database and show it (data are turkish chars
)  

My problem is  =

when i put  
	<%@ page contentType= "text/html; charset=ISO-8859-9" %> 
at the beginnig of the page(second jsp) , my second jsp shows turkish chars
which comes from database  
but it doesn't show chars where comes from my first jsp ( String tur_char =
request.getParameter("inputone") ) 

and then ..
 
when i put  
	<head>
		<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-9">
	</head>

at the beginnig of the page(second jsp) , my second jsp shows chars where
comes from my first jsp ( String tur_char = request.getParameter("inputone")
) 
but it doesn't shows turkish chars  which comes from database  . 


I am using Tomcat 3.2 , apache1.3.14 ,   Red Hat 7.0 

any idea  ?

thanks 




Altuğ Bilgin Altıntaş
Koç.net Haberleşme Teknolojileri ve İletişim Hizmetleri A.Ş.
Uygulama Geliştirme
Tel :  (0216) 556 32 38
 E-Mail: altuga@koc.net

 

This mail and all of it's attachments are scanned against all known viruses and vandals by Koç.net...

Re: charset problem

Posted by Martin Kuba <ma...@twelvehorses.com>.
"G.Nagarajan" wrote:
> 
> hi,
> Try setting the default locale to Turkish in the jsp page before using
> request.getParameter.
> 
> I had this problem with umlauts and changing the locale to German solved it.

I think that the problem is the coversion performed by TomCat
when converting HTTP request (which is URL encoded IS0-8859-9
characters) 
into Java String representation (which is UNICODE) and it uses
ISO-8859-1-to-UNICODE conversion. Try this:

new
String(request.getParameter("foo").getBytes("ISO-8859-1"),"ISO-8859-9")

Martin

RE: charset problem

Posted by "G.Nagarajan" <gn...@dkf.de>.
hi,
Try setting the default locale to Turkish in the jsp page before using
request.getParameter.

I had this problem with umlauts and changing the locale to German solved it.

regards,
Nagaraj.


-----Original Message-----
From: Altug Altintas (Koç.Net) [mailto:altuga@koc.net]
Sent: Wednesday, December 13, 2000 7:33 PM
To: 'general@jakarta.apache.org'
Subject: charset problem


Hi all .

I have got two jsp pages . In the first one I write Turkish chars
(ISO-8859-9) and post it to my second page .
In my second jsp page ,
	1 ) i get paramaters from my first page which are turkish chars and
show it .
	2 ) i fetch  data  from database and show it (data are turkish chars
)

My problem is  =

when i put
	<%@ page contentType= "text/html; charset=ISO-8859-9" %>
at the beginnig of the page(second jsp) , my second jsp shows turkish chars
which comes from database
but it doesn't show chars where comes from my first jsp ( String tur_char =
request.getParameter("inputone") )

and then ..

when i put
	<head>
		<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-9">
	</head>

at the beginnig of the page(second jsp) , my second jsp shows chars where
comes from my first jsp ( String tur_char = request.getParameter("inputone")
)
but it doesn't shows turkish chars  which comes from database  .


I am using Tomcat 3.2 , apache1.3.14 ,   Red Hat 7.0

any idea  ?

thanks




Altuð Bilgin Altýntaþ
Koç.net Haberleþme Teknolojileri ve Ýletiþim Hizmetleri A.Þ.
Uygulama Geliþtirme
Tel :  (0216) 556 32 38
 E-Mail: altuga@koc.net



This mail and all of it's attachments are scanned against all known viruses
and vandals by Koç.net...

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