cancel
Showing results for 
Search instead for 
Did you mean: 

Windows vs Linux - character encoding

Former Member
0 Kudos

I have 2 WAS servers version 6.40 sp13. One on

windows server 2003

and other on

linux

. I deploy the same application on both servers and that application displays a

euro currency symbol €

on the browser. The WAS server running on windows serevr 2003 is able to display the euro currency symbol properly but the server running on linux displays garbage instead

(like this € ).

I have tested all the browsers and it doesnt seem to be browser related.

The application is built on JSF with XML style UTF-8 encoding.

Both servers have the default configuration and both OS have the default configurations as well. I tried to find the difference in server configs but couldn't find anything.

Any help is appreciated.

This is the header on all the pages.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

Accepted Solutions (1)

Accepted Solutions (1)

prashil
Advisor
Advisor
0 Kudos

Hi Faraz,

Try to use the encoding style, ISO 8859-1

This might help!!!!

Thanks,

Prashil

Former Member
0 Kudos

I tried almost all of the encoding styles on mets tags, nothing changed. Actually I also ran a packet sniffer and looked at the packets that are sent from the app server in linux and server sends (2E 2E 2E which is ... ) incase of Euro symbol. Hex for Euro symbol is 80. So in linux there seems to be something wrong in the conversion/handling of data values.

Windows sends 80, which shows the correct symbol.

Former Member
0 Kudos

Hi!

Did you try the special euro character? & euro; (without the space). Some time ago we had this problem, and we solved this way.

Hope this works.

Eneko

Former Member
0 Kudos

I don't think I made my point clear. The problem is not only with Euro characters but with all the other non-english characters that are found in unicode. We are going to support multiple languages (French, german etc.) and I dont think its a wise decision to convert all these characters in their HTML equivalent (if they exist).

Sigiswald
Contributor
0 Kudos

Hi Faraz,

The ISO-8859-1 (or Latin 1) character set does not contain the euro sign character. Windows typically uses CP1252 (or WinLatin1 or Windows code page 1252), which is an extension of ISO-8859-1 where they (ab)use some reserved control characters, e.g. 0x80 is used as the euro sign. The unicode hex value of the euro sign is 0x20AC. If you encode 0x20AC in UTF-8, it is represented as 3 bytes, 0xE2 0x82 0xAC to be precisely.

Changing the meta tags of your (X)HTML won't make a difference if the underlying encoding is not correct. Probably the files of your applications were created on a Windows box, using the default Windows character set CP1252 and then deployed on Linux. I suggest you convert the files itself to UTF-8. That can be done using a text editor like UltraEdit (my favourite!) or even Notepad (Save As and choose UTF-8 as the encoding).

Good luck! Character encoding problems are often quite complex to solve.

Kind regards,

Sigiswald

Answers (0)