留言板

German(umlauts) character issue in linux machine

thumbnail
Faris Abdulla,修改在12 年前。

German(umlauts) character issue in linux machine

Regular Member 帖子: 183 加入日期: 09-9-2 最近的帖子
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,修改在12 年前。

RE: German(umlauts) character issue in linux machine

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
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,修改在12 年前。

RE: German(umlauts) character issue in linux machine

Regular Member 帖子: 183 加入日期: 09-9-2 最近的帖子
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,修改在12 年前。

RE: German(umlauts) character issue in linux machine

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
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,修改在12 年前。

RE: German(umlauts) character issue in linux machine

Regular Member 帖子: 183 加入日期: 09-9-2 最近的帖子
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,修改在12 年前。

RE: German(umlauts) character issue in linux machine

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
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,修改在12 年前。

RE: German(umlauts) character issue in linux machine

Regular Member 帖子: 183 加入日期: 09-9-2 最近的帖子
Thanks for your time and reply...

I'll update after figuring out the issue soon..
thumbnail
Faris Abdulla,修改在12 年前。

RE: German(umlauts) character issue in linux machine

Regular Member 帖子: 183 加入日期: 09-9-2 最近的帖子
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,修改在9 年前。

RE: German(umlauts) character issue in linux machine

Junior Member 帖子: 31 加入日期: 13-1-30 最近的帖子
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,修改在8 年前。

RE: German(umlauts) character issue in linux machine

New Member 发布: 1 加入日期: 15-6-17 最近的帖子
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?