All pastes #738769 Raw Edit

UTF8

public text v1 · immutable
·published 2007-10-16 16:40 UTC
rendered paste body
CONFIGURATION PHP (php.ini)

Dans la section mbstring modifier pour avoir pareil que ci-dessous :
[mbstring]
mbstring.language=UTF-8
mbstring.internal_encoding=UTF-8

; ENCODAGE EN ENTREE
mbstring.http_input=UTF-8

; ENCODAGE EN SORTIE
mbstring.http_output=UTF-8

; ACTIVE LA CONVERSION DES DONNEES EN ENTREE VERS LE CHARSET DEFINI
mbstring.encoding_translation = On

; DEFINI L'ORDRE DE DETECTION DES ENCODAGES PAR DEFAUT
mbstring.detect_order = auto

; DEFINIT L'ENCODAGE DE SUBSTITUTION PAR DEFAUT
;mbstring.substitute_character = none;


CONFIGURATION MySQL (my.cnf) :
# PARTIE DAEMON
[mysqld]

## UTF-8 ##
character-set-server=utf8
skip-character-set-client-handshake

CONFIGURATION APACHE (httpd.conf) :
au niveau du module mime :
    AddDefaultCharset UTF-8

J'utilise AdoDB pour gérer mes connexions SQL et donc je commence toujours par :
      $this->connexion = &ADONewConnection('mysqli');
      $this->connexion->PConnect(HOST, LOGIN, PASSWORD, BDD);
      $this->connexion->Execute('SET NAMES utf8');
      $this->connexion->Execute('SET character_set_database = utf8');
      $this->connexion->Execute('SET character_set_server   = utf8');
Histoire de forcer l'utf.

Puis pour finir dans chaque fichier html :
<?xml encoding="utf8" version="1.0"?>