SommaireTelecharger la documentationChapitre suivantChapitre precedent  

  .: News :.: Edito :.: Scripts :.: Forum :.: Erreurs :.: Jobs :. 
 
Sommaire

Chaînes de caractères multi-octets

Introduction
mb_language
mb_parse_str
mb_internal_encoding
mb_http_input
mb_http_output
mb_detect_order
mb_substitute_character
mb_output_handler
mb_preferred_mime_name
mb_strlen
mb_strpos
mb_strrpos
mb_substr
mb_strcut
mb_strwidth
mb_strimwidth
mb_convert_encoding
mb_detect_encoding
mb_convert_kana
mb_encode_mimeheader
mb_decode_mimeheader
mb_convert_variables
mb_encode_numericentity
mb_decode_numericentity
mb_send_mail

6.51.7 mb_detect_order

[ Exemples avec mb_detect_order ]   PHP 4 >= 4.0.6

Description

array mb_detect_order([mixed encoding-list ])

mb_detect_order remplace l'ordre de détection des encodages courant par encoding-list. mb_detect_order retourne TRUE en cas de succès, et FALSE en cas d'erreur failure.

encoding-list est un tableau, ou une liste d'encodages séparés par une virgule. La valeur "auto" est automatiquement remplacé par "ASCII, JIS, UTF-8, EUC-JP, SJIS".

SI encoding-list est omis, mb_detect_order retourne l'ordre de détection courant des encodages.

Ce paramétrage affected les fonctions mb_detect_encoding et mb_send_mail.

Exemple avec mb_detect_order

<?php
/* Remplace l'ordre de détection par une liste énumérée */
mb_detect_order("eucjp-win,sjis-win,UTF-8");
/* Remplace l'ordre de détection par un tableau */
$ary[] = "ASCII";
$ary[] = "JIS";
$ary[] = "EUC-JP";
mb_detect_order($ary);
/* Affiche l'ordre de détection courant */
echo implode(", "mb_detect_order());
?>

Voir aussi mb_internal_encoding, mb_http_input, mb_http_output et mb_send_mail


Chapitre précédentChapitre suivantAccueil nexen.net