★ wanayoo — archive 1999 http://www.php.net/manual/fr/function.utf8-encode.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to XML
Quick Reference
English version of this pageGerman version of this pageJapanese version of this pageItalian version of this pageHungarian version of this page
XML
* xml_parser_create
* xml_set_object
* xml_set_element_handler
* xml_set_character_data_handler
* xml_set_processing_instruction_handler
* xml_set_default_handler
* xml_set_unparsed_entity_decl_handler
* xml_set_notation_decl_handler
* xml_set_external_entity_ref_handler
* xml_parse
* xml_get_error_code
* xml_error_string
* xml_get_current_line_number
* xml_get_current_column_number
* xml_get_current_byte_index
* xml_parser_free
* xml_parser_set_option
* xml_parser_get_option
* utf8_decode
* utf8_encode
Manual: utf8_encode
View the source code for this pageSearch the site



Previous page
 utf8_decode
 Updated
Sun, 06 Aug 2000
NIS 
Next page


utf8_encode

(PHP3 >= 3.0.6, PHP4 )

utf8_encode -- Convertit un une chaîne ISO-8859-1 en UTF-8.

Description

string utf8_encode (string data)

Cette fonction code la chaîne data au format UTF-8, et retourne la version codée. UTF-8 est un mécanisme standardisé utilisé par Unicode pour coder les caractère de grande taille dans des flots d'octets. UTF-8 est transparent pour les caractères ASCII, il est auto-synchronisé (c'est à dire qu'un programme peut toujours savoir dans un flot d'octet oú un caractère commence), et peut être utilisé pour faire des comparaisons de chaînes standard, comme pour le tri. PHP utilise l'UTF-8 pour coder les caractères jusqu'à 4 octets comme ceci :

Tableau 1. UTF-8 encoding

octetsbitsreprésentation
170bbbbbbb
211110bbbbb 10bbbbbb
3161110bbbb 10bbbbbb 10bbbbbb
42111110bbb 10bbbbbb 10bbbbbb 10bbbbbb
Chaque b représente un bit qui peut être utilisé pour enregistrer un caractère.


 About Notes


Previous page
 utf8_decode
 Updated
Sun, 06 Aug 2000
NIS 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.