mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-30 04:42:24 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@162453 c90b9560-bf6c-de11-be94-00142212c4b1
80 lines
2.5 KiB
XML
80 lines
2.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.7 $ -->
|
|
<!-- EN-Revision: 1.3 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<refentry id="function.mb-convert-encoding">
|
|
<refnamediv>
|
|
<refname>mb_convert_encoding</refname>
|
|
<refpurpose>Conversion d'encodage</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>mb_convert_encoding</methodname>
|
|
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>to-encoding</parameter></methodparam>
|
|
<methodparam choice="opt"><type>mixed</type><parameter>from-encoding</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>mb_convert_encoding</function> convertit la chaîne
|
|
<parameter>str</parameter> depuis l'encodage
|
|
<parameter>from-encoding</parameter> vers l'encodage
|
|
<parameter>to-encoding</parameter>.
|
|
</para>
|
|
<para>
|
|
<parameter>str</parameter> : chaîne de caractères à convertir.
|
|
</para>
|
|
<para>
|
|
<parameter>from-encoding</parameter> est l'encodage de la chaîne
|
|
<parameter>str</parameter> à l'origine. Il sera détecté parmi
|
|
plusieurs encodages fournis sous forme d'un tableau, ou d'une
|
|
liste d'encodages séparés par des virgules.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>mb_convert_encoding</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
/* Convertit l'encodage interne vers SJIS */
|
|
$str = mb_convert_encoding($str, "SJIS");
|
|
/* Convertit EUC-JP en UTF-7 */
|
|
$str = mb_convert_encoding($str, "UTF-7", "EUC-JP");
|
|
/* Détecte automatiquement un encodage entre JIS, eucjp-win ou sjis-win,
|
|
Puis convertit en UCS-2LE */
|
|
$str = mb_convert_encoding($str, "UCS-2LE", "JIS, eucjp-win, sjis-win");
|
|
/* "auto" signifie "ASCII,JIS,UTF-8,EUC-JP,SJIS" */
|
|
$str = mb_convert_encoding($str, "EUC-JP", "auto");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Voir aussi
|
|
<function>mb_detect_order</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|