0

I'm facing a quite new situation. I'm not an expert about charset, but as far as I know, all the chain should use the same encoding system.

If I put accents directly in the html code, they'll look fine. However, when I fetch data from my mysql database, all of them will be displayed like this : �, no matter if I echo them in the body or using scripts.

On the page, I have set this :

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<?php
header('Content-Type:text/html; charset=UTF-8');
?>
<?xml version="1.0" encoding="UTF-8"?>
<meta charset="UTF-8">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>

Regarding the database : the server uses UTF-8 Unicode (utf8) utf8_general_ci The table utf8_general_ci The fields utf8_general_ci

I'm running out of ideas.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Vincent Monteil
  • 568
  • 5
  • 22

0 Answers0