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@235909 c90b9560-bf6c-de11-be94-00142212c4b1
135 lines
3.3 KiB
XML
135 lines
3.3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<!-- EN-Revision: 1.2 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry id="function.unicode-encode">
|
|
<refnamediv>
|
|
<refname>unicode_encode</refname>
|
|
<refpurpose>Définit l'encodage d'une chaîne unicode</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>unicode_encode</methodname>
|
|
<methodparam><type>unicode</type><parameter>input</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
|
|
</methodsynopsis>
|
|
&warn.undocumented.func;
|
|
<para>
|
|
Prend une chaîne <type>unicode</type> et la convertie en une chaîne
|
|
dans un encodage spécifié.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>input</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La chaîne <type>unicode</type> qui va être encodée.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>encoding</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le nouvel encodage de <parameter>input</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>flags</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Drapeaux
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Une &string; en cas de succès, ou &false; si une erreur survient.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Émet une erreur de niveau <constant>E_WARNING</constant> si un converteur
|
|
ne peut être créé pour l'encodage désiré.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>unicode_encode</function></title>
|
|
<para>
|
|
Note : Les caractères seront visibles au lieu des entités dans l'affichage.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
header ('Content-Type: text/plain; charset=ISO-8859-2');
|
|
|
|
$encoded = unicode_encode ('\u0150\u0179', 'ISO-8859-2');
|
|
|
|
echo 'Unicode semantique : ', ini_get ('unicode_semantics'), PHP_EOL;
|
|
echo 'La chaîne elle-même :', $encoded, PHP_EOL;
|
|
echo 'La longueur de la chaîne : ', strlen ($encoded);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
Unicode semantique : 1
|
|
La chaîne elle-même : ŐŹ
|
|
La longueur de la chaîne : 2
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>unicode_symantics</function></member>
|
|
</simplelist>
|
|
</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
|
|
--> |