Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

French characters and Accents not displayed (PHP mbstring ?)

Posted on 2004-09-17
10
Medium Priority
?
686 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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.
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

886 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