LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-13-2008, 06:17 AM   #1
coolsti
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
Language configuration issue with Danish alphabet


This may be a more general question, but since I have the problem with a Novel SUSE 10.1 PC, I will place it in this forum for starters.

I am migrating a mysql/PHP web application to a SUSE 10.1 PC. And I can not always get the special Danish letters å, æ and ø to show up correctly on the remote browser when a PHP or HTML page is requested from this machine.

I have a Centos 4.5 machine, and everything works correctly.

This is what I can and cannot do on the SUSE 10.1 machine:

- Danish letters show up correctly on the remote browser when they are read from a mysql database into PHP variables and then echo'ed to the browser as part of a page request.

- Danish letters show up correctly in a shell terminal and with the VIM editor, when I connect to the SUSE machine via ssh from my Centos 4.5 machine (the SUSE is located remotely from me).

- Danish letters do not show up correctly if I have them "hard coded" as part of an HTML file. This happens if I create the file on the SUSE machine, or if I create the file on the Centos machine (where everything works fine) and then scp the file over to the SUSE machine and do not edit it any more. And they do not show up correctly if I hard code them into a PHP script.

I must be missing some sort of language configuration on the SUSE machine. My Centos machine was installed with English as default language but with Danish as default keyboard.

Does anyone know where my problem is and how to fix it? I would like to have Danish letters (and German ones also) render correctly on web pages coming from the SUSE machine in all cases.

Thanks for any tips!
 
Old 05-13-2008, 09:08 AM   #2
hro
LQ Newbie
 
Registered: Jan 2008
Distribution: OpenSuse 10.3, SLED 10 SP2, Ubuntu 8.04 and 9.04
Posts: 23

Rep: Reputation: 15
You should have meta tag in your html head section. That would tell the browser what encoding to use. For example:
Code:
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
You could set your locales same in both machines. Too see what locale is in use, type 'locale' on command prompt. Check also what locale is used by root in each machine. If locales cannot be changed you can translate between encodings using 'recode', but that would require a lot of glue.
 
Old 05-14-2008, 01:42 AM   #3
coolsti
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hro View Post
You should have meta tag in your html head section. That would tell the browser what encoding to use. For example:
Code:
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
You could set your locales same in both machines. Too see what locale is in use, type 'locale' on command prompt. Check also what locale is used by root in each machine. If locales cannot be changed you can translate between encodings using 'recode', but that would require a lot of glue.
Thanks for the reply!

The locale command response is the same on both machines:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

So this cannot be the problem.

Yesterday I tried to place the meta tag in my output headers but with no help. But today I just tried it in a little test html file and it worked! Perhaps in my haste yesterday I inserted a syntax error.

It is strange to me that I need to do this with the one machine but not the other. I suspect it may be the Apache setup if that has a way to define a default character set. But as long as the meta tag solution works, that is fine!

Thanks for the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
language add issue wanghao Linux - Desktop 0 11-05-2007 11:03 PM
OpenOffice language issue abort...retry Linux - Software 4 07-31-2006 02:43 AM
Language Issue karl.fisher Red Hat 1 05-18-2004 09:21 AM
Language configuration problem satimis Red Hat 0 09-25-2003 08:14 PM
to change the language configuration eye Linux - Software 1 08-31-2003 01:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration