Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

French characters and Accents not displayed (PHP mbstring ?)

Posted on 2004-09-17
10
Medium Priority
?
682 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

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…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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

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