mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 00:12:06 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@338572 c90b9560-bf6c-de11-be94-00142212c4b1
156 lines
4.9 KiB
XML
156 lines
4.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: bae77bed957d623e2acac30d32bbf6b503195c2a Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.mb-encode-mimeheader" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>mb_encode_mimeheader</refname>
|
|
<refpurpose>Codifica un string para la cabecera MIME</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>mb_encode_mimeheader</methodname>
|
|
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>charset</parameter><initializer>determined by mb_language()</initializer></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>transfer_encoding</parameter><initializer>"B"</initializer></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>linefeed</parameter><initializer>"\r\n"</initializer></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>indent</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Codifica el <type>string</type>
|
|
<parameter>str</parameter> dado mediante el esquema de codificación de cabecera MIME.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>str</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El <type>string</type> que va a ser codificado.
|
|
Su codificación debería ser la misma que <function>mb_internal_encoding</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>charset</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<parameter>charset</parameter> especifica el nombre del conjunto de caracteres
|
|
en el cual está representado <parameter>str</parameter>. El valor predeterminado
|
|
está determinado por el ajuste NLS en uso (<literal>mbstring.language</literal>).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>transfer_encoding</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<parameter>transfer_encoding</parameter> especifica el esquema de la codifición
|
|
MIME. Debería ser <literal>"B"</literal> (Base64) o
|
|
<literal>"Q"</literal> (Quoted-Printable). Si no ser proporciona será
|
|
<literal>"B"</literal>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>linefeed</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<parameter>linefeed</parameter> especifica la marca EOL (fin de línea)
|
|
con la que <function>mb_encode_mimeheader</function> realiza
|
|
el pliegue de línea (un término de <link xlink:href="&url.rfc;2822">RFC</link>,
|
|
que es el acto de dividir una línea mayor que una cierta longitud en varias
|
|
líneas. La longitud actualmente es de 74 caracteres).
|
|
Si no se proporciona será <literal>"\r\n"</literal> (CRLF).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>indent</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La indentación de la primera línea (número de caracteres en la cabecera
|
|
antes de <parameter>str</parameter>).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Una versión convertida del <type>string</type> representado en ASCII.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>mb_encode_mimeheader</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$name = ""; // kanji
|
|
$mbox = "kru";
|
|
$doma = "gtinn.mon";
|
|
$addr = mb_encode_mimeheader($name, "UTF-7", "Q") . " <" . $mbox . "@" . $doma . ">";
|
|
echo $addr;
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
Esta función no está diseñada para dividir líneas en puntos de rotura contextual
|
|
de alto nivel (límites de palabras, etc.).
|
|
Este comportamiento podría abarrotar el string original con espacios inesperados.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>mb_decode_mimeheader</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:"~/.phpdoc/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
|
|
-->
|