Jump to content

Weird character encoding behavior


rawb

Recommended Posts

Ok I've got kind of a weird character encoding problem that I'm going to try to describe as best I can :).  Basically, I'm having a lot of trouble rendering French characters and there seems to be a general consensus (on google) that utf-8 is the way to go for French.

 

The MySQL database is set up to use the 'utf8_general_ci' collation, and my HTML also uses utf-8 character encoding like so:

 

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

 

The Problem:

 

When using the utf-8 character encoding on my html pages, everything appears to work perfectly.  However, when I go to PHPMyAdmin and check the database, it inserts weird characters ('é' instead of 'é', for example).

 

When using the 'ISO-8859-1' charset on my HTML pages, everything inserts and retrieves correctly (this is what I'm currently doing).

 

The thing is, I would really like to use the utf-8 charset in my HTML to keep things consistent between my database and my HTML.  If this charset is supposed to be able to support French, then why is it doing this?

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/146794-weird-character-encoding-behavior/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.