Forums de discussion

German(umlauts) character issue in linux machine

thumbnail
Faris Abdulla, modifié il y a 12 années.

German(umlauts) character issue in linux machine

Regular Member Publications: 183 Date d'inscription: 02/09/09 Publications récentes
Hi,

I've problem of displaying the german characters(ä, ö, ü, ß) in web page which the server is hosted in linux machine. The server hosted in windows machine is displaying properly.

Some encoding problem while compiling from linux machine. In ubuntu (Linux Ubuntu-910-karmic-64-minimal)

The characters are showing like this:
Ich habe seit �ber .., Wie w�rden Sie ihren k�rperlichen .. etc

How can i solve this issue in linux machine. Is there any encoding setup to do in linux machine?

Please help me on this issue to solve..

Regards,
Faris
thumbnail
Hitoshi Ozawa, modifié il y a 12 années.

RE: German(umlauts) character issue in linux machine

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
Are you having displaying Liferay's messages in German on your web browser?
Or are you having problem writing a program that displays German umlauts on a web browser?
If later, if the character is static, you just have to save the jsp file in UTF8 encoding. If you're having problem with data from a database, check that your database is in UTF8 encoding.
thumbnail
Faris Abdulla, modifié il y a 12 années.

RE: German(umlauts) character issue in linux machine

Regular Member Publications: 183 Date d'inscription: 02/09/09 Publications récentes
Hi Hitoshi Ozawa,

Thanks for the reply..

Noticed the issue in two place.
1) I've a static text file which is read using java.util.Scanner(new FileReader("sample.txt"));
This file contains german characters(umlauts). This file is read and displayed in web page. It was working fine in windows machine. But when moved to linux the characters are displayed as mentioned in above post. And this text is displayed through portlet jsp. In liferay all the page will be pageEncoding="UTF-8" which is mentioned in "/html/common/init.jsp"(liferay-5.2.3) .
<%@ page contentType="text/html; charset=UTF-8" %>

2) Imported the web content .lar file, which is exported from windows machine, shows the same problem. (german characters). But if I edit the individual character in web content and save, then its working fine.

My database is cerated using DEFAULT CHARACTER SET utf8.
Even I can see by default all the pages in liferay are utf8 encoded using <meta>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

Why this issue in linux machine not in windows?

Please help me on this.. Is it something related to compiler...not sure..?
thumbnail
Hitoshi Ozawa, modifié il y a 12 années.

RE: German(umlauts) character issue in linux machine

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
MS Windows's default encoding isn't UTF8. Your program or your environment probably is Windows-1252 encoding instead of UTF8.
Linux's default encoding is UTF8 - since your program or environment isn't UTF8, all characters aren't being displayed properly.
thumbnail
Faris Abdulla, modifié il y a 12 années.

RE: German(umlauts) character issue in linux machine

Regular Member Publications: 183 Date d'inscription: 02/09/09 Publications récentes
In liferay all the pages are UTF8 encoded. I developed the project in ext-5.2.3 environment.

Using liferay tomcat 6.0.18

How can I solve this issue in linux machine. I tried adding <%@ page contentType="text/html; charset=UTF-8" %> in specific jsp's header.

Regards,
Faris
thumbnail
Hitoshi Ozawa, modifié il y a 12 années.

RE: German(umlauts) character issue in linux machine

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
Sorry that all I can say. I'm not having any problem with characters (Japanese, English, German, Spanish) on CentOS and on MS Windows.
Probably best to get somebody on site to help you.
thumbnail
Faris Abdulla, modifié il y a 12 années.

RE: German(umlauts) character issue in linux machine

Regular Member Publications: 183 Date d'inscription: 02/09/09 Publications récentes
Thanks for your time and reply...

I'll update after figuring out the issue soon..
thumbnail
Faris Abdulla, modifié il y a 12 années.

RE: German(umlauts) character issue in linux machine

Regular Member Publications: 183 Date d'inscription: 02/09/09 Publications récentes
Hi Hitoshi,

I fixed the problem after a small research. By default the sample.txt file is encoded as cp1252. Using eclipse I changed the encoding to UTF-8 and it worked fine in linux machine.

Thanks,
Faris
sumalatha N, modifié il y a 9 années.

RE: German(umlauts) character issue in linux machine

Junior Member Publications: 31 Date d'inscription: 30/01/13 Publications récentes
Hi,
I am facing the same issue on profile update.
German umlauts in firstname and lastname are not displaying properly.

Following is my header
<!DOCTYPE html> <html class="ltr" dir="ltr" lang="en-US"> <head> <title>sumäläthä N</title>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />

can you please help me?
thumbnail
Abdelaziz Marzouk, modifié il y a 8 années.

RE: German(umlauts) character issue in linux machine

New Member Envoyer: 1 Date d'inscription: 17/06/15 Publications récentes
I am having the same problem while importing the lar file to my Linux machine.

I set the correct german values and it works fine.

Then I exported the lar file from the linux machine and imported it to the same machine in a new site and the problem is hapenning again.

The charset in my DB is set to UTF-8.

Does anyone know how to solve this problem or its a liferay bug?