encoding in french browser

Posted on 2009-02-23
Last Modified: 2012-08-13
I use utf-8 in meta for encoding

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; utf-8">

I tried mysql in utf8_unicode_ci and utf8_general_ci but both replace é, è, à with
ý when browser default language is set to french but display them correctly if browser default language is english.

Any idea?
Question by:mammouth
    LVL 19

    Expert Comment

    Try specifying the content language explicitly by adding the META tag below to see if it makes a difference.
    <META HTTP-EQUIV="Content-Language" Content="en">

    Open in new window

    LVL 1

    Author Comment

    already set to
    <META HTTP-EQUIV="Content-Language" Content="fr">
    and return bad sqare character.
    LVL 19

    Accepted Solution

    I meant trying to use "en" instead of "fr" in the META tag to see if it makes a difference. The problem might be the original encoding used when the characters were inserted into the database, perhaps it was Latin1. Do you know what the original encoding when the characters were inserted?

    After connecting try to issue the following command to see if it makes a difference:

    mysql_query ('SET NAMES UTF8');

    If it does not work try to identify the original character encoding the database was set to when the characters were inserted, once we know it we can try using the iconv function in PHP to do explicit character set conversion.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to count occurrences of each item in an array.

    779 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

    18 Experts available now in Live!

    Get 1:1 Help Now