You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Allistair Crossley <Al...@QAS.com> on 2005/02/23 10:29:48 UTC
RE: Arabic encoding
Hi,
HTML <meta> tags won't help you.
Take a look at response.setCharacterEncoding("UTF-8") and JSP page directive for contentType
<%@ page contentType="text/html; charset=UTF-8" %>
Replace UTF-8 with the charset for Arabic and see if that helps.
Allistair.
> -----Original Message-----
> From: Fadwa Barham [mailto:fadwa@najah.edu]
> Sent: 23 February 2005 21:20
> To: tomcat-user@jakarta.apache.org
> Subject: Arabic encoding
>
>
> Hi,
> I face difficulties with encoding, at first I developed
> servlets that connects to oracle database, the oracle
> encoding is US7Ascii and it contains arabic data, I used
> Java1.3 to write the code and tomcat 4.0.6 to deploy the
> servlets, I just needed to get the write encoding of the
> servlets, both the data from the database or the messages I
> write in the code in arabic, is puting these lines in the servlet
> <meta http-equiv="Content-Language" content="ar-sa">
> <META http-equiv=Content-Type
> content="text/html;charset=windows-1256">
> when I wanted to use Java 5 I get question marks
> and when I used the servlets which I compiled on jdk1.3 in
> tomcat 5.5.8 I need to adjust the encoding each time I
> request the servlet to windows-1256.
> what's the problem of the encoding in the new versions of
> Java and tomcat?
> I noticed the internationalization in the tomcat contains
> tomcat-i18n-en.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,tomca
> t-i18n-es.jar
> is the problem that I need tomcat-i18n-ar.jar? and if so, how
> to get it?
> Hope I explained the problem in obvious way.
> I can't continue using tomcat 4.0.6 cause I always have
> dbconnection failure as I use jndi DataSource, but I found
> tomcat 5.5.8 is more stable.
> Please I need help
> Thanks,
>
<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Arabic encoding
Posted by Fadwa Barham <fa...@najah.edu>.
hi,
thanks for your reply,
I tried using in my servlet
res.setContentType("text/html; charset=UTF-8")
but I didn't have arabic when I compiled it with jdk1.3, and I could't
adjust the encoding from the internet explorer as I did when I don't use
res.setContentType("text/html; charset=UTF-8"), and I also tried
res.setContentType("text/html; charset=windows-1256") and I get all the
arabic data in the servlet and the database question marks.
I noticed something: when I compile the servlet using Java 5 and write in
the servlet
res.setContentType("text/html; charset=UTF-8") or
res.setContentType("text/html; charset=windows-1256")
without using
<meta http-equiv="Content-Language" content="ar-sa">
<META http-equiv=Content-Type content="text/html;charset=windows-1256">
I get the words I wrote in the servlet in arabic correct but the data from
the database in question mark and also if the servlet has a form, when I
submit the data I get the phrase also in question mark.
and when I used
req.setCharacterEncoding("utf-8") or
req.setCharacterEncoding("windows-1256") or
<meta http-equiv="Content-Language" content="ar-sa">
<META http-equiv=Content-Type content="text/html;charset=windows-1256">
I have the form phrase in arabic but the database cannot realize the
encoding and return 0 results.
thanks,
Fadwa
----- Original Message -----
From: "Allistair Crossley" <Al...@QAS.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, February 23, 2005 11:29 AM
Subject: RE: Arabic encoding
> Hi,
>
> HTML <meta> tags won't help you.
>
> Take a look at response.setCharacterEncoding("UTF-8") and JSP page
> directive for contentType
>
> <%@ page contentType="text/html; charset=UTF-8" %>
>
> Replace UTF-8 with the charset for Arabic and see if that helps.
>
> Allistair.
>
>> -----Original Message-----
>> From: Fadwa Barham [mailto:fadwa@najah.edu]
>> Sent: 23 February 2005 21:20
>> To: tomcat-user@jakarta.apache.org
>> Subject: Arabic encoding
>>
>>
>> Hi,
>> I face difficulties with encoding, at first I developed
>> servlets that connects to oracle database, the oracle
>> encoding is US7Ascii and it contains arabic data, I used
>> Java1.3 to write the code and tomcat 4.0.6 to deploy the
>> servlets, I just needed to get the write encoding of the
>> servlets, both the data from the database or the messages I
>> write in the code in arabic, is puting these lines in the servlet
>> <meta http-equiv="Content-Language" content="ar-sa">
>> <META http-equiv=Content-Type
>> content="text/html;charset=windows-1256">
>> when I wanted to use Java 5 I get question marks
>> and when I used the servlets which I compiled on jdk1.3 in
>> tomcat 5.5.8 I need to adjust the encoding each time I
>> request the servlet to windows-1256.
>> what's the problem of the encoding in the new versions of
>> Java and tomcat?
>> I noticed the internationalization in the tomcat contains
>> tomcat-i18n-en.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,tomca
>> t-i18n-es.jar
>> is the problem that I need tomcat-i18n-ar.jar? and if so, how
>> to get it?
>> Hope I explained the problem in obvious way.
>> I can't continue using tomcat 4.0.6 cause I always have
>> dbconnection failure as I use jndi DataSource, but I found
>> tomcat 5.5.8 is more stable.
>> Please I need help
>> Thanks,
>>
>
>
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
> -------------------------------------------------------
> QAS Ltd.
> Developers of QuickAddress Software
> <a href="http://www.qas.com">www.qas.com</a>
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> -------------------------------------------------------
> </FONT>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org