Solved

French characters and Accents not displayed (PHP mbstring ?)

Posted on 2004-09-17
10
665 Views
Last Modified: 2013-12-16
Hello,
We are using a brand new server running Fedora and Plesk. Only a few sites and a support system (ESupport) installed so far, however we cannot see the French accents being displayed properly.
According to an admin, the problem was narrowed down to the PHP config - A feature called mbstring ?
You can see the problem here :
http://www.copyrightmarker.com/testphpfrenchaccents.php
The correct sentence displayed should be
"Votre demande a bien été transmise à notre service Service Clients é à î, elle sera lue et traitée très prochainement.".

What must be corrected or updated so that our server displays French correctly ?
Thanks.


0
Comment
Question by:Denisvt
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 10

Expert Comment

by:Luxana
ID: 12090536
try different character encoding: western (ISO-8859-1)

0
 
LVL 10

Expert Comment

by:Luxana
ID: 12090541
or some others not sure....
0
 
LVL 3

Author Comment

by:Denisvt
ID: 12090582
Should that be specified in our PHP config and how ? Is it related to "mbstring" ?
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 10

Expert Comment

by:Luxana
ID: 12090647
0
 
LVL 48

Expert Comment

by:hernst42
ID: 12102864
That problem is not related to mbstring (mbstring is used for japanese/chinese strings where a char consits of multiple bytes, so a strlen must do something different as for ISO-charsets)
make sure there are the correct meta-tags generated in HTML as Luxana suggested e.g:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
<meta http-equiv="content-language" content="fr">
</head>
<body>
Votre demande a bien été transmise à notre service Service Clients é à î, elle sera lue et traitée très prochainement.
</body>
</html>
Then your string should be displayed correctly
0
 
LVL 3

Author Comment

by:Denisvt
ID: 12542149
We have once again experienced the same problem. A whole website that worked fine on another older server was transfered onto that new one, and all accents in French would not display.
I'm desperate to understand that big problem, never seen that before and we cannot host a site if half of its contents looks like rubbish...
Thanks.

0
 
LVL 48

Expert Comment

by:hernst42
ID: 12542174
You may compare the two php.ini from the new and the old server, maybe there are different settings which show the wrong characterset for that page.
0
 
LVL 3

Author Comment

by:Denisvt
ID: 12550088
I lost a lot of hair on that one, and endless hours...Solution found by chance while discussing with an IT friend who apparently saw that before. Not sure if that applies to all Plesk servers by default, but apparently some have a "bad" default Apache config (the default charset in httpd.conf), that creates problem for Web contents with accents, such as pages in French. Solution :

Edit that Apache config file httpd.conf :

In /etc/httpd/conf/httpd.conf  look for:
AddDefaultCharset UTF-8
comment it out (#AddDefaultCharset UTF-8)
 
Restart apache server (service httpd restart).

All sites fine since then...
Thanks to those who helped.

 
 
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 15749345
PAQed with points (250) refunded

DarthMod
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question