tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: retrive Arabic data
Date Thu, 28 May 2009 21:47:07 GMT
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 

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.

> 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:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message