Solved

French characters and Accents not displayed (PHP mbstring ?)

Posted on 2004-09-17
10
652 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
 
LVL 10

Expert Comment

by:Luxana
ID: 12090647
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now