Re: retrive Arabic data
Hi, I am using following tools and technologies for the web application · apache-tomcat-5.5.23 · jdk_1.5.0_12 · JSP, Servlet · SQL servelr 2005 · Windows server 2005 enterprise edition SP1 1. All JSP pages have the following code · %@ page contentType=text/html;charset=Cp1252 % · meta http-equiv=Content-Type content=text/html; charset=windows-1256 2. In servelet, The ouptput of request.getCharacterEncoding()) is appeared as NULL 3. In Database properties, collation is set as SQL_Latin1_General_CP1_CI_AS 4. Database table column where Arabic inserted is nvarchar 5. In insert statement, Arabic string inserted as N’arabictext 6. Deafault charset on the windows server 2003 platform is windows-1252 I have done the following two points extra to retrieve the Arabic data. 7. In Regional and language option on Windows server 2003, in Advance tab, the language for non Unicode programs is selected as Arabic(UAE). 8. Restarted the window server 2003. Able to retrieve the Arabic data. Thanks Regards -Abdul Razack --- On Mon, 6/1/09, André Warnier a...@ice-sa.com wrote: From: André Warnier a...@ice-sa.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Monday, June 1, 2009, 3:42 PM Hi Abdul. Can you write exactly what you changed to make it work ? It would help for future similar cases, if there were some tips available in the mailing list. (Particularly what was /not/ the problem). Thanks. abdul razack wrote: Hi, Please accept my appreciation for responding my queries. The problem of retrieving Arabic data is solved. As told, it is not straight answer to the problem and need to figure out step by step. After making sure that everything is perfect from application and database point of view, I figured out problem lies in regional and language option setting on Windows server. And I corrected the same. Again thank you for the help in achieving the significant result. Thanks Regards -Abdul Razack --- On Sat, 5/30/09, George Sexton geor...@mhsoftware.com wrote: From: George Sexton geor...@mhsoftware.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Saturday, May 30, 2009, 8:38 PM Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 George, On 5/28/2009 3:59 PM, George Sexton wrote: The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. That's a bold statement. $ uname -a Linux chadis 2.6.14-gentoo-r5 #2 PREEMPT Sat Dec 17 16:30:55 EST 2005 i686 AMD Athlon(tm) XP 1700+ AuthenticAMD GNU/Linux $ java -version java version 1.6.0_13 Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) $ java -classpath .. Env | grep file\.encoding= file.encoding=ANSI_X3.4-1968 That's ASCII, baby! My statements were based on tests I ran at one point in time. Here's some tests I ran today: OpenSuSE 10.3, 11.0 and 11.1 = UTF-8. Windows XP w/ JDK 1.6.0_13 = Cp1252 MacOS 10.5 = MacRoman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Hi Abdul. Can you write exactly what you changed to make it work ? It would help for future similar cases, if there were some tips available in the mailing list. (Particularly what was /not/ the problem). Thanks. abdul razack wrote: Hi, Please accept my appreciation for responding my queries. The problem of retrieving Arabic data is solved. As told, it is not straight answer to the problem and need to figure out step by step. After making sure that everything is perfect from application and database point of view, I figured out problem lies in regional and language option setting on Windows server. And I corrected the same. Again thank you for the help in achieving the significant result. Thanks Regards -Abdul Razack --- On Sat, 5/30/09, George Sexton geor...@mhsoftware.com wrote: From: George Sexton geor...@mhsoftware.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Saturday, May 30, 2009, 8:38 PM Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 George, On 5/28/2009 3:59 PM, George Sexton wrote: The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. That's a bold statement. $ uname -a Linux chadis 2.6.14-gentoo-r5 #2 PREEMPT Sat Dec 17 16:30:55 EST 2005 i686 AMD Athlon(tm) XP 1700+ AuthenticAMD GNU/Linux $ java -version java version 1.6.0_13 Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) $ java -classpath .. Env | grep file\.encoding= file.encoding=ANSI_X3.4-1968 That's ASCII, baby! My statements were based on tests I ran at one point in time. Here's some tests I ran today: OpenSuSE 10.3, 11.0 and 11.1 = UTF-8. Windows XP w/ JDK 1.6.0_13 = Cp1252 MacOS 10.5 = MacRoman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 George, On 5/30/2009 10:55 AM, George Sexton wrote: Christopher Schultz wrote: On 5/28/2009 3:59 PM, George Sexton wrote: The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. That's a bold statement. Clearly you missed the part AT ONE POINT IN TIME. On my systems, when I was trying to figure it out at one point in time, that's what I saw. Easy, Cujo. It's not clear from your post that AT ONE POINT IN TIME the Linux default was something specific. It's only clear that the Windows default enjoys that qualification. 1) Default Charset on each platform. - -1 Figuring out the default on different platforms is step 1 of understanding you have a problem. There's a difference between someone telling you that there's a problem, and seeing it. Fully understanding the problem is a growth point that will prevent it from happening again. While proper enlightenment does require as much information as possible, solving this problem does not involve determining the default charset on any platform. I believe you run the risk of confusing the OP by adding this variable to the equation. If you use something like one of the ISO encodings then you're tied to English Don't tell that to anyone who speaks Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak, Slovenian, Upper Sorbian, Lower Sorbian, Finnish, Danish, German, French, Italian, Spanish, or Portuguese. There are probably others covered by the ISO character sets. I would also check the system you're on /for the browser/. I had a problem where one machine could properly render Chinese characters while another one couldn't: the server was 100% correct but the client was failing to display them properly. There's nothing the server can do about that! I've seen this many years ago, but not recently (5 years or so). Certain versions of Windows XP do not ship with appropriate fonts for Chinese and other languages: you have to install a multi-language pack in order to support them. My version of Vista did not appear to have this problem, but I'm not sure if that's because they changed something specific. I don't have a volume license for Vista (there's just no reason to upgrade everyone here to change the color of the Start menu ;). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkokE4sACgkQ9CaO5/Lv0PAnZwCfTUoTorfEVylydmmm6sOrSzuz XEQAn1QLscWkJ6srMf1efLvhXneUYlpj =HOnJ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Christopher Schultz wrote: If you use something like one of the ISO encodings then you're tied to English Don't tell that to anyone who speaks Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak, Slovenian, Upper Sorbian, Lower Sorbian, Finnish, Danish, German, French, Italian, Spanish, or Portuguese. There are probably others covered by the ISO character sets. Mis-Statement on my part. What I meant was if you use one of the single-byte ISO-encodings, you're stuck with English and any languages covered by that encoding. You can't have a language not covered by that encoding. IOW, if you're using ISO-8859-1 as the encoding on a page, you can have English, German, Spanish, French, etc. But, if you try to put Polish on the page things will mess up. -- George Sexton MH Software, Inc. Voice: +1 303 438 9585 URL: http://www.mhsoftware.com/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: retrive Arabic data
agree..languages are much easier on the western side of the oder-niesse rivers http://www.nytimes.com/2007/12/20/world/europe/20border.html (still looking for a polish translator) Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Mon, 1 Jun 2009 12:11:17 -0600 From: geor...@mhsoftware.com To: users@tomcat.apache.org Subject: Re: retrive Arabic data Christopher Schultz wrote: If you use something like one of the ISO encodings then you're tied to English Don't tell that to anyone who speaks Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak, Slovenian, Upper Sorbian, Lower Sorbian, Finnish, Danish, German, French, Italian, Spanish, or Portuguese. There are probably others covered by the ISO character sets. Mis-Statement on my part. What I meant was if you use one of the single-byte ISO-encodings, you're stuck with English and any languages covered by that encoding. You can't have a language not covered by that encoding. IOW, if you're using ISO-8859-1 as the encoding on a page, you can have English, German, Spanish, French, etc. But, if you try to put Polish on the page things will mess up. -- George Sexton MH Software, Inc. Voice: +1 303 438 9585 URL: http://www.mhsoftware.com/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009
Re: retrive Arabic data
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 George, On 6/1/2009 2:11 PM, George Sexton wrote: Christopher Schultz wrote: If you use something like one of the ISO encodings then you're tied to English Don't tell that to anyone who speaks Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak, Slovenian, Upper Sorbian, Lower Sorbian, Finnish, Danish, German, French, Italian, Spanish, or Portuguese. There are probably others covered by the ISO character sets. Mis-Statement on my part. What I meant was if you use one of the single-byte ISO-encodings, you're stuck with English and any languages covered by that encoding. You can't have a language not covered by that encoding. IOW, if you're using ISO-8859-1 as the encoding on a page, you can have English, German, Spanish, French, etc. But, if you try to put Polish on the page things will mess up. True. ISO-8859-2 covers Polish and the host of other languages I mentioned. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkokPv0ACgkQ9CaO5/Lv0PC3hACff0PdmrZBxO9hIfL7/dNphTpp 5XIAnRLHroL9p/c6QmzLIIic2gnPG86V =HpVH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Hi, Please accept my appreciation for responding my queries. The problem of retrieving Arabic data is solved. As told, it is not straight answer to the problem and need to figure out step by step. After making sure that everything is perfect from application and database point of view, I figured out problem lies in regional and language option setting on Windows server. And I corrected the same. Again thank you for the help in achieving the significant result. Thanks Regards -Abdul Razack --- On Sat, 5/30/09, George Sexton geor...@mhsoftware.com wrote: From: George Sexton geor...@mhsoftware.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Saturday, May 30, 2009, 8:38 PM Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 George, On 5/28/2009 3:59 PM, George Sexton wrote: The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. That's a bold statement. $ uname -a Linux chadis 2.6.14-gentoo-r5 #2 PREEMPT Sat Dec 17 16:30:55 EST 2005 i686 AMD Athlon(tm) XP 1700+ AuthenticAMD GNU/Linux $ java -version java version 1.6.0_13 Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) $ java -classpath .. Env | grep file\.encoding= file.encoding=ANSI_X3.4-1968 That's ASCII, baby! My statements were based on tests I ran at one point in time. Here's some tests I ran today: OpenSuSE 10.3, 11.0 and 11.1 = UTF-8. Windows XP w/ JDK 1.6.0_13 = Cp1252 MacOS 10.5 = MacRoman -- George Sexton MH Software, Inc. Voice: +1 303 438 9585 URL: http://www.mhsoftware.com/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 George, On 5/28/2009 3:59 PM, George Sexton wrote: The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. That's a bold statement. $ uname -a Linux chadis 2.6.14-gentoo-r5 #2 PREEMPT Sat Dec 17 16:30:55 EST 2005 i686 AMD Athlon(tm) XP 1700+ AuthenticAMD GNU/Linux $ java -version java version 1.6.0_13 Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) $ java -classpath .. Env | grep file\.encoding= file.encoding=ANSI_X3.4-1968 That's ASCII, baby! My statements were based on tests I ran at one point in time. Here's some tests I ran today: OpenSuSE 10.3, 11.0 and 11.1 = UTF-8. Windows XP w/ JDK 1.6.0_13 = Cp1252 MacOS 10.5 = MacRoman -- George Sexton MH Software, Inc. Voice: +1 303 438 9585 URL: http://www.mhsoftware.com/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 George, On 5/28/2009 3:59 PM, George Sexton wrote: The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. That's a bold statement. $ uname -a Linux chadis 2.6.14-gentoo-r5 #2 PREEMPT Sat Dec 17 16:30:55 EST 2005 i686 AMD Athlon(tm) XP 1700+ AuthenticAMD GNU/Linux $ java -version java version 1.6.0_13 Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) $ java -classpath .. Env | grep file\.encoding= file.encoding=ANSI_X3.4-1968 That's ASCII, baby! I'm sure the same issue is happening here. It's defaulting to Windows-1256 on Arabic windows, on another OS it's defaulting to ISO-8859-1 or perhaps ISO-8859-6. As Len points out, file.encoding should have nothing to do with this since the data source is a database. file.encoding is only used when converting bytes to characters and no encoding has explicitly been specified. The db driver should at least default to something (which /may/ be file.encoding but should probably default to whatever the database is actually using). I ran into these kind of issues when I called the various String to Byte Array functions, e.g. String.getBytes(). I was calling getBytes() and then using a hash function for the result and getting different results on different machines. That's because calling String.getBytes() is a bad idea. You should be using String.getBytes(String). In short, there's no simple answer. You have to figure out step by step where things are going wrong, and then address those issues. +1 1) Default Charset on each platform. - -1 2) Charset the database is declared with 3) Charset of data coming in from db. +1 4) Charset of pages. Do the pages explicitly set the encoding to UTF-8? +0 : UTF-8 isn't the only game in town, but it's the only one worth playing :) This application wouldn't work on any system unless the page encoding had been explicitly set to something that contained Arabic characters, since the default JSP encoding is ISO-8859-1 which clearly does not contain such characters. I would also check the system you're on /for the browser/. I had a problem where one machine could properly render Chinese characters while another one couldn't: the server was 100% correct but the client was failing to display them properly. There's nothing the server can do about that! I would also check your database driver settings. If you use Tomcat to set up your database connection pool (using a Resource element in context.xml) then you may have different encodings set on different servers. Make sure that they are all the same (and I would highly recommend copying the one that /works/). Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkogpOUACgkQ9CaO5/Lv0PBIugCeOkeVDuR/TP0KsormCIyTfcUt tRgAn2xc4ohoLvJC3dcvyylHzhDpKGf3 =afO0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André-John, On 5/28/2009 7:23 PM, Andre-John Mas wrote: You can specify any encoding you wish, but this is the most universal encoding. If you don't specify the character encoding in the content-type most browsers will default to ISO-8859-1 as the specification requires. It's the /server/ that defaults to using ISO-8859-1, not the browser. The browser will simply do what it's told (unless it's MSIE, of course, in which case it will do as it pleases). - You can over-ride the default encoding used by the VM, by passing the -Djava.encoding=UTF-8 option in catalina.bat Better to set this in bin/setenv.sh to keep your options separate from the actual startup script. One assumption you can make is that Java uses UTF-16 internally. True, but not really relevant. There is no encoding of a String. Character encodings only come into play when you need to convert characters to bytes. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkogpegACgkQ9CaO5/Lv0PD4lgCbBSEV0WAHYWIVpg5B+dUWsDAl AToAoLcB5Hg3T4/33+t0yoNy0xlFqlfO =siA+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André-John, On 5/28/2009 6:59 PM, Andre-John Mas wrote: The ability to display non-latin charactrers depends as much on the client operating system, as on the what the server is providing. For example if you have nothing on your computer that knows how to render arabic charcaters then you are likely to end up with junk characters (usually question marks). Absolutely. Most recent operating systems support UTF-8. With Windows 2003 server and Windows 2000, it will depend on what browser you are using, whether you have international language packs installed and whether you have the right fonts. It will always depend on the browser you are using. The operating system is not relevant. Linux, MS-Windows (as of Windows XP) and MacOS X all know how to deal with UTF-8. On Windows you should ensure that at least Internet Explorer 7 is being used. Malarchy: Windows versions before Windows XP could handle non-latin character sets. Unicode support is part of win32 and should be available for all versions of win32 including that awful kludge win32s which could be installed onto Windows 3.1. MSIE 7+ is not at all required to view utf8. MSIE versions back to 2.0 have supported multi-byte character sets. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkogqLoACgkQ9CaO5/Lv0PAZ/QCgi0+w/tOSOEgkgmdj8LxGUPzC ebIAoJdMD55sJ7RfFzb0TVSCxkWjfQAq =O0qz -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Hi, I have tested java application with the same setup as I mentioned on windows XP professional PC, windows 2000 professional and Windows Server 2003 Enterprise edition SP1. The regional settings for Arabic in all three environments were configured. I could able to retrieve Arabic data perfectly only in Window XP prefessional. But not able to retrive Arabic on Wnidows server 2003 Enterprise Edition SP1 and Windows 2000 professional. Please let me know whether any thing to do with Operating system settings -Thanks Regards -Abdul Razack --- On Wed, 5/27/09, Mark Thomas ma...@apache.org wrote: From: Mark Thomas ma...@apache.org Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 5:48 PM abdul razack wrote: 1. In server.xml Connector port=89 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 useBodyEncodingForURI=true URIEncoding=UTF-8 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / 2. In all JSP pages %@ page contentType=text/html;charset=UTF-8 % meta http-equiv=Content-Type content=text/html; charset=UTF-8 3. But I am surprise to see in servlet that request.getCharacterEncoding ( ) as null. Still I have same problem. Try the sample JSP in the FAQ I pointed you towards. If that works, you have an application issue. If that doesn't work, you have broken your Tomcat config somewhere. Mark -Abdul Razack --- On Wed, 5/27/09, Youssef Mohammed youssef.moham...@gmail.com wrote: From: Youssef Mohammed youssef.moham...@gmail.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 4:53 PM u just need to set your content encoding to UTF-8 in your jspes %@ page pageEncoding=UTF-8 % I think also there might be a way to set the default encoding to utf8 ! Regards, Youssef On Wed, May 27, 2009 at 2:16 PM, abdul razack sh_abd...@yahoo.com wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Hi Mark, As you suggested, I have tested sample JSP in the FAQ as you pointed. I could see Arabic in the output. This is OK. I am not able to view Arabic data when tomcat application running on winodws 2003 server OR windows 2000 professional. But I am surprised to see Arabic data when I run application on windows XP professional. In all above scenarios data base SQL server 2005 resides on Windows 2003 server. Any other setting that I need to do in Tomcat. Thanks Regards -Abdul Razack --- On Wed, 5/27/09, Mark Thomas ma...@apache.org wrote: From: Mark Thomas ma...@apache.org Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 5:48 PM abdul razack wrote: 1. In server.xml Connector port=89 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 useBodyEncodingForURI=true URIEncoding=UTF-8 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / 2. In all JSP pages %@ page contentType=text/html;charset=UTF-8 % meta http-equiv=Content-Type content=text/html; charset=UTF-8 3. But I am surprise to see in servlet that request.getCharacterEncoding ( ) as null. Still I have same problem. Try the sample JSP in the FAQ I pointed you towards. If that works, you have an application issue. If that doesn't work, you have broken your Tomcat config somewhere. Mark -Abdul Razack --- On Wed, 5/27/09, Youssef Mohammed youssef.moham...@gmail.com wrote: From: Youssef Mohammed youssef.moham...@gmail.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 4:53 PM u just need to set your content encoding to UTF-8 in your jspes %@ page pageEncoding=UTF-8 % I think also there might be a way to set the default encoding to utf8 ! Regards, Youssef On Wed, May 27, 2009 at 2:16 PM, abdul razack sh_abd...@yahoo.com wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
On Thu, May 28, 2009 at 4:23 PM, abdul razack sh_abd...@yahoo.com wrote: Hi Mark, As you suggested, I have tested sample JSP in the FAQ as you pointed. I could see Arabic in the output. This is OK. I am not able to view Arabic data when tomcat application running on winodws 2003 server OR windows 2000 professional. But I am surprised to see Arabic data when I run application on windows XP professional. This might suggest that the problem has nothing to do with tomcat. I would go for checking this issue with MS folks (platform setting , db/ db driver settings, ... ) In all above scenarios data base SQL server 2005 resides on Windows 2003 server. Any other setting that I need to do in Tomcat. Thanks Regards -Abdul Razack --- On Wed, 5/27/09, Mark Thomas ma...@apache.org wrote: From: Mark Thomas ma...@apache.org Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 5:48 PM abdul razack wrote: 1. In server.xml Connector port=89 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 useBodyEncodingForURI=true URIEncoding=UTF-8 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / 2. In all JSP pages %@ page contentType=text/html;charset=UTF-8 % meta http-equiv=Content-Type content=text/html; charset=UTF-8 3. But I am surprise to see in servlet that request.getCharacterEncoding ( ) as null. Still I have same problem. Try the sample JSP in the FAQ I pointed you towards. If that works, you have an application issue. If that doesn't work, you have broken your Tomcat config somewhere. Mark -Abdul Razack --- On Wed, 5/27/09, Youssef Mohammed youssef.moham...@gmail.com wrote: From: Youssef Mohammed youssef.moham...@gmail.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 4:53 PM u just need to set your content encoding to UTF-8 in your jspes %@ page pageEncoding=UTF-8 % I think also there might be a way to set the default encoding to utf8 ! Regards, Youssef On Wed, May 27, 2009 at 2:16 PM, abdul razack sh_abd...@yahoo.com wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Or Tomcat installations are configured differently on each of the environments, e.g. Connector URIEncoding attribute. On Thu, May 28, 2009 at 3:28 PM, Youssef Mohammed youssef.moham...@gmail.com wrote: On Thu, May 28, 2009 at 4:23 PM, abdul razack sh_abd...@yahoo.com wrote: Hi Mark, As you suggested, I have tested sample JSP in the FAQ as you pointed. I could see Arabic in the output. This is OK. I am not able to view Arabic data when tomcat application running on winodws 2003 server OR windows 2000 professional. But I am surprised to see Arabic data when I run application on windows XP professional. This might suggest that the problem has nothing to do with tomcat. I would go for checking this issue with MS folks (platform setting , db/ db driver settings, ... ) In all above scenarios data base SQL server 2005 resides on Windows 2003 server. Any other setting that I need to do in Tomcat. Thanks Regards -Abdul Razack --- On Wed, 5/27/09, Mark Thomas ma...@apache.org wrote: From: Mark Thomas ma...@apache.org Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 5:48 PM abdul razack wrote: 1. In server.xml Connector port=89 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 useBodyEncodingForURI=true URIEncoding=UTF-8 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / 2. In all JSP pages %@ page contentType=text/html;charset=UTF-8 % meta http-equiv=Content-Type content=text/html; charset=UTF-8 3. But I am surprise to see in servlet that request.getCharacterEncoding ( ) as null. Still I have same problem. Try the sample JSP in the FAQ I pointed you towards. If that works, you have an application issue. If that doesn't work, you have broken your Tomcat config somewhere. Mark -Abdul Razack --- On Wed, 5/27/09, Youssef Mohammed youssef.moham...@gmail.com wrote: From: Youssef Mohammed youssef.moham...@gmail.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 4:53 PM u just need to set your content encoding to UTF-8 in your jspes %@ page pageEncoding=UTF-8 % I think also there might be a way to set the default encoding to utf8 ! Regards, Youssef On Wed, May 27, 2009 at 2:16 PM, abdul razack sh_abd...@yahoo.com wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Youssef Mohammed wrote: I am not able to view Arabic data when tomcat application running on winodws 2003 server OR windows 2000 professional. But I am surprised to see Arabic data when I run application on windows XP professional. Hi. My knowledge of java and Tomcat is limited, so I may be off-base here. But I have also has occasional issues with Tomcat and non-US character sets on various Windows platforms. Just for information, what is the basic Windows language version of the 3 Windows servers you are using ? I mean, is for example the Windows XP system some arabic version, while the 2003 and 2000 servers are basic English/US-Windows ? The reason for my question : when a Java JVM starts under Unix/Linux, it takes its language settings from the locale of the process it is starting under. You can change these settings, by changing the locale of the process, then starting the JVM (and Tomcat e.g.). For a Windows JVM however, there is no such locale, and I've never quite figured out where the JVM takes its language settings (including the default charset). I suppose it is from the Windows environment somewhere though. I have a strong suspicion that your problem is in that area. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
On Thu, May 28, 2009 at 15:35, André Warnier a...@ice-sa.com wrote: Hi. My knowledge of java and Tomcat is limited, so I may be off-base here. But I have also has occasional issues with Tomcat and non-US character sets on various Windows platforms. Just for information, what is the basic Windows language version of the 3 Windows servers you are using ? I mean, is for example the Windows XP system some arabic version, while the 2003 and 2000 servers are basic English/US-Windows ? The reason for my question : when a Java JVM starts under Unix/Linux, it takes its language settings from the locale of the process it is starting under. You can change these settings, by changing the locale of the process, then starting the JVM (and Tomcat e.g.). For a Windows JVM however, there is no such locale, and I've never quite figured out where the JVM takes its language settings (including the default charset). I suppose it is from the Windows environment somewhere though. I have a strong suspicion that your problem is in that area. You shouldn't need to mess with the Java locale. A webapp can handle text in different languages/alphabets simultaneously, no matter what the default settings are for the server OS or JVM. I was able to get character encodings to work correctly on Windows XP by following the recommendations in the FAQ that Mark pointed out (http://wiki.apache.org/tomcat/FAQ/CharacterEncoding) and making sure the database was storing text as UTF-8. But I haven't tried other versions of Windows. -- Len - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. I'm sure the same issue is happening here. It's defaulting to Windows-1256 on Arabic windows, on another OS it's defaulting to ISO-8859-1 or perhaps ISO-8859-6. I ran into these kind of issues when I called the various String to Byte Array functions, e.g. String.getBytes(). I was calling getBytes() and then using a hash function for the result and getting different results on different machines. If you call java.nio.charset.Charset.defaultCharset().displayName(), you can see what it is. Here's a reasonable discussion of some of the issues. http://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding In short, there's no simple answer. You have to figure out step by step where things are going wrong, and then address those issues. I would check: 1) Default Charset on each platform. 2) Charset the database is declared with 3) Charset of data coming in from db. 4) Charset of pages. Do the pages explicitly set the encoding to UTF-8? André Warnier wrote: Youssef Mohammed wrote: I am not able to view Arabic data when tomcat application running on winodws 2003 server OR windows 2000 professional. But I am surprised to see Arabic data when I run application on windows XP professional. Hi. My knowledge of java and Tomcat is limited, so I may be off-base here. But I have also has occasional issues with Tomcat and non-US character sets on various Windows platforms. Just for information, what is the basic Windows language version of the 3 Windows servers you are using ? I mean, is for example the Windows XP system some arabic version, while the 2003 and 2000 servers are basic English/US-Windows ? The reason for my question : when a Java JVM starts under Unix/Linux, it takes its language settings from the locale of the process it is starting under. You can change these settings, by changing the locale of the process, then starting the JVM (and Tomcat e.g.). For a Windows JVM however, there is no such locale, and I've never quite figured out where the JVM takes its language settings (including the default charset). I suppose it is from the Windows environment somewhere though. I have a strong suspicion that your problem is in that area. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- George Sexton MH Software, Inc. Voice: +1 303 438 9585 URL: http://www.mhsoftware.com/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
For Len : I agree with what George writes below. I also agree with the point that a webapp /can/ handle any charset properly, if it is properly programmed to do so. The point here is that probably, some webapp is /not/ properly programmed for that, and just uses the default charset of the JVM And, as George explains below, that one is different under different circumstances. Which was why I asked the OP about the different Windows flavors. By the way, does anyone know for sure /where/ the Sun Windows JVM picks up the default locale settings ? George Sexton wrote: The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. I'm sure the same issue is happening here. It's defaulting to Windows-1256 on Arabic windows, on another OS it's defaulting to ISO-8859-1 or perhaps ISO-8859-6. I ran into these kind of issues when I called the various String to Byte Array functions, e.g. String.getBytes(). I was calling getBytes() and then using a hash function for the result and getting different results on different machines. If you call java.nio.charset.Charset.defaultCharset().displayName(), you can see what it is. Here's a reasonable discussion of some of the issues. http://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding In short, there's no simple answer. You have to figure out step by step where things are going wrong, and then address those issues. I would check: 1) Default Charset on each platform. 2) Charset the database is declared with 3) Charset of data coming in from db. 4) Charset of pages. Do the pages explicitly set the encoding to UTF-8? André Warnier wrote: Youssef Mohammed wrote: I am not able to view Arabic data when tomcat application running on winodws 2003 server OR windows 2000 professional. But I am surprised to see Arabic data when I run application on windows XP professional. Hi. My knowledge of java and Tomcat is limited, so I may be off-base here. But I have also has occasional issues with Tomcat and non-US character sets on various Windows platforms. Just for information, what is the basic Windows language version of the 3 Windows servers you are using ? I mean, is for example the Windows XP system some arabic version, while the 2003 and 2000 servers are basic English/US-Windows ? The reason for my question : when a Java JVM starts under Unix/Linux, it takes its language settings from the locale of the process it is starting under. You can change these settings, by changing the locale of the process, then starting the JVM (and Tomcat e.g.). For a Windows JVM however, there is no such locale, and I've never quite figured out where the JVM takes its language settings (including the default charset). I suppose it is from the Windows environment somewhere though. I have a strong suspicion that your problem is in that area. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: retrive Arabic data
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: retrive Arabic data By the way, does anyone know for sure /where/ the Sun Windows JVM picks up the default locale settings ? Via a couple of proprietary Windows APIs: GetUserDefaultLCID http://msdn.microsoft.com/en-us/library/dd318135(VS.85).aspx GetSystemDefaultLCID http://msdn.microsoft.com/en-us/library/dd318121(VS.85).aspx - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
On 28-May-2009, at 09:23, abdul razack wrote: Hi Mark, As you suggested, I have tested sample JSP in the FAQ as you pointed. I could see Arabic in the output. This is OK. I am not able to view Arabic data when tomcat application running on winodws 2003 server OR windows 2000 professional. But I am surprised to see Arabic data when I run application on windows XP professional. In all above scenarios data base SQL server 2005 resides on Windows 2003 server. Any other setting that I need to do in Tomcat. The ability to display non-latin charactrers depends as much on the client operating system, as on the what the server is providing. For example if you have nothing on your computer that knows how to render arabic charcaters then you are likely to end up with junk characters (usually question marks). The best character encoding to use for international data, and in general IMHO, is UTF-8. Most recent operating systems support UTF-8. With Windows 2003 server and Windows 2000, it will depend on what browser you are using, whether you have international language packs installed and whether you have the right fonts. Linux, MS-Windows (as of Windows XP) and MacOS X all know how to deal with UTF-8. On Windows you should ensure that at least Internet Explorer 7 is being used. Andre - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
On 28-May-2009, at 10:00, Stevo Slavić wrote: Or Tomcat installations are configured differently on each of the environments, e.g. Connector URIEncoding attribute. URIEncoding only effects how the query URL is interpretted, AFAIK. It effects nothing else. André-John - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
True. If I understood well, problem is not in submitting requests, but in rendering response, data fetched from database aren't displayed well on one machine, but do get displayed well on the other. Abdul didn't mention details about client side where was he opening problematic page. Let's assume he always tested application using same browser and version on same machine where server/application was running, so both client and server were same pc. Besides possibility of different default encoding having effect on server side, could availability of fonts on client machines also have effect on how site is rendered? Maybe some application Abdul installed on XP but not on two servers brought with itself additional fonts which site/page just happens to makes use of. Regards, Stevo. On Fri, May 29, 2009 at 1:02 AM, Andre-John Mas aj...@sympatico.ca wrote: On 28-May-2009, at 10:00, Stevo Slavić wrote: Or Tomcat installations are configured differently on each of the environments, e.g. Connector URIEncoding attribute. URIEncoding only effects how the query URL is interpretted, AFAIK. It effects nothing else. André-John - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
On 28-May-2009, at 15:59, George Sexton wrote: The issue is the default character set for Java. I've noticed that at least at one point in time, the default character set for Java running under windows was Windows-1252. Running under Linux it defaults to ISO-8859-1. A few other things to ensure: - If you are using JSPs ensure that the content header is correct: %...@page contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % You can specify any encoding you wish, but this is the most universal encoding. If you don't specify the character encoding in the content-type most browsers will default to ISO-8859-1 as the specification requires. - You can over-ride the default encoding used by the VM, by passing the -Djava.encoding=UTF-8 option in catalina.bat The default encoding under Linux actually depends on which distribution you are using. Red Hat for example defaults to UTF-8. In general you should not make any assumptions on which character encoding the OS is using. One assumption you can make is that Java uses UTF-16 internally. André-John - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Hi, Try to check the encoding of your jsp pages! It must be UTF-8 as well! BB S. abdul razack ha scritto: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack -- *I.M.I.N. Holding s.r.l.* Sergio Arrighi sergio.arri...@iminholding.com mailto:sergio.arri...@iminholding.com Cell. 3455805121 Vicolo Molino, 2 21052 Busto Arsizio Varese Tel. +39 0331324679 Fax. +39 0331324678 www.iminholding.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
u just need to set your content encoding to UTF-8 in your jspes %@ page pageEncoding=UTF-8 % I think also there might be a way to set the default encoding to utf8 ! Regards, Youssef On Wed, May 27, 2009 at 2:16 PM, abdul razack sh_abd...@yahoo.com wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
In server.xml you have to set the http connector attribute: Connector port=80 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true URIEncoding=UTF-8 / Try this out! S. Youssef Mohammed ha scritto: u just need to set your content encoding to UTF-8 in your jspes %@ page pageEncoding=UTF-8 % I think also there might be a way to set the default encoding to utf8 ! Regards, Youssef On Wed, May 27, 2009 at 2:16 PM, abdul razack sh_abd...@yahoo.com wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- *I.M.I.N. Holding s.r.l.* Sergio Arrighi sergio.arri...@iminholding.com mailto:sergio.arri...@iminholding.com Cell. 3455805121 Vicolo Molino, 2 21052 Busto Arsizio Varese Tel. +39 0331324679 Fax. +39 0331324678 www.iminholding.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
abdul razack wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Tomcat internals, no. Tomcat configuration / your code - probably. http://wiki.apache.org/tomcat/FAQ/CharacterEncoding Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
Thanks for the quick reply. In all JSP pages, i am using %@ page contentType=text/html;charset=utf-8 % meta http-equiv=Content-Type content=text/html; charset=utf-8. But I am surprise to see in servlet that request.getCharacterEncoding ( ) as null. -Abdul Razack --- On Wed, 5/27/09, Sergio Arrighi sergio.arri...@iminholding.com wrote: From: Sergio Arrighi sergio.arri...@iminholding.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 4:51 PM Hi, Try to check the encoding of your jsp pages! It must be UTF-8 as well! BB S. abdul razack ha scritto: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack -- *I.M.I.N. Holding s.r.l.* Sergio Arrighi sergio.arri...@iminholding.com mailto:sergio.arri...@iminholding.com Cell. 3455805121 Vicolo Molino, 2 21052 Busto Arsizio Varese Tel. +39 0331324679 Fax. +39 0331324678 www.iminholding.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
1. In server.xml Connector port=89 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 useBodyEncodingForURI=true URIEncoding=UTF-8 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / 2. In all JSP pages %@ page contentType=text/html;charset=UTF-8 % meta http-equiv=Content-Type content=text/html; charset=UTF-8 3. But I am surprise to see in servlet that request.getCharacterEncoding ( ) as null. Still I have same problem. -Abdul Razack --- On Wed, 5/27/09, Youssef Mohammed youssef.moham...@gmail.com wrote: From: Youssef Mohammed youssef.moham...@gmail.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 4:53 PM u just need to set your content encoding to UTF-8 in your jspes %@ page pageEncoding=UTF-8 % I think also there might be a way to set the default encoding to utf8 ! Regards, Youssef On Wed, May 27, 2009 at 2:16 PM, abdul razack sh_abd...@yahoo.com wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: retrive Arabic data
abdul razack wrote: 1. In server.xml Connector port=89 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 useBodyEncodingForURI=true URIEncoding=UTF-8 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / 2. In all JSP pages %@ page contentType=text/html;charset=UTF-8 % meta http-equiv=Content-Type content=text/html; charset=UTF-8 3. But I am surprise to see in servlet that request.getCharacterEncoding ( ) as null. Still I have same problem. Try the sample JSP in the FAQ I pointed you towards. If that works, you have an application issue. If that doesn't work, you have broken your Tomcat config somewhere. Mark -Abdul Razack --- On Wed, 5/27/09, Youssef Mohammed youssef.moham...@gmail.com wrote: From: Youssef Mohammed youssef.moham...@gmail.com Subject: Re: retrive Arabic data To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, May 27, 2009, 4:53 PM u just need to set your content encoding to UTF-8 in your jspes %@ page pageEncoding=UTF-8 % I think also there might be a way to set the default encoding to utf8 ! Regards, Youssef On Wed, May 27, 2009 at 2:16 PM, abdul razack sh_abd...@yahoo.com wrote: Hi, I have Java web application (JSP, Servlet, SQL server 2005) running on apache-tomcat-5.5.23. I am facing one problem when retriving Arabic data from database. The data contains both english and Arabic in table. when retirve data from java application all arabic is appearing as . But english is coming is perfectly. The combination of Arabic and english data will be inserted in the database through other application (ASP.Net technology).The encoding uses (UTF-8). In database table arabic columns will have arabic and english columns will have english. Please give me direction what would have gone wrong. Would there be any problem in Tomcat. Thanks Regards -Abdul Razack - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org