mirror of
https://github.com/php/doc-ja.git
synced 2026-04-29 11:03:19 +02:00
97d4b3b8bf
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@193050 c90b9560-bf6c-de11-be94-00142212c4b1
93 lines
3.4 KiB
XML
93 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- $Revision: 1.5 $ -->
|
||
<!-- splitted from ./ja/functions/mbstring.xml, last change in rev 1.1 -->
|
||
<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready -->
|
||
<!-- CREDITS: takagi -->
|
||
<refentry id="function.mb-encode-mimeheader">
|
||
<refnamediv>
|
||
<refname>mb_encode_mimeheader</refname>
|
||
<refpurpose>MIMEヘッダの文字列をエンコードする</refpurpose>
|
||
</refnamediv>
|
||
<refsect1>
|
||
<title>説明</title>
|
||
<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></methodparam>
|
||
<methodparam choice="opt"><type>string</type><parameter>transfer_encoding</parameter></methodparam>
|
||
<methodparam choice="opt"><type>string</type><parameter>linefeed</parameter></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
<function>mb_encode_mimeheader</function> は、MIME ヘッダ
|
||
エンコーディング方式によって文字列 <parameter>str</parameter>
|
||
をエンコードします。この関数は、ASCII 表現の文字列を返します。
|
||
</para>
|
||
<para>
|
||
<parameter>charset</parameter> は、<parameter>str</parameter>
|
||
の文字セット名です。デフォルトは、現在の NLS 設定
|
||
(<literal>mbstring.language</literal>)によって決まります。
|
||
</para>
|
||
<para>
|
||
<parameter>transfer_encoding</parameter> は MIME エンコーディングの
|
||
方式を指定します。<literal>"B"</literal> (Base64) または
|
||
<literal>"Q"</literal> (Quoted-Printable) のどちらかでなければなりません。
|
||
デフォルトは <literal>"B"</literal> です。
|
||
</para>
|
||
<para>
|
||
<parameter>linefeed</parameter> は EOL(行末)のマーカで、
|
||
<function>mb_encode_mime_header</function> が行を折りたたむ
|
||
(<ulink url="&url.rfc;2822">RFC</ulink> 用語で、
|
||
ある一定より長い行を複数行に分割することを言います。
|
||
分割する長さは、現在 74 文字に固定されています)際に利用します。
|
||
デフォルトは <literal>"\r\n"</literal> (CRLF) です。
|
||
</para>
|
||
<para>
|
||
<example>
|
||
<title><function>mb_encode_mimeheader</function> の例</title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
$name = "太郎"; // 漢字
|
||
$mbox = "kru";
|
||
$doma = "gtinn.mon";
|
||
$addr = mb_encode_mimeheader($name, "UTF-7", "Q") . " <" . $mbox . "@" . $doma . ">";
|
||
echo $addr;
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
</para>
|
||
<note>
|
||
<para>
|
||
この関数は、行を分割する際に特別な配慮(単語の区切りなど)を
|
||
行いません。このせいで、もとの文字列に予期せぬ空白が入ってしまう
|
||
可能性があります。
|
||
</para>
|
||
</note>
|
||
<para>
|
||
<function>mb_decode_mimeheader</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
|
||
-->
|