array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.quoted-printable-decode.php', 1 => 'quoted_printable_decode', ), 'up' => array ( 0 => 'ref.strings.php', 1 => 'String 関数', ), 'prev' => array ( 0 => 'function.printf.php', 1 => 'printf', ), 'next' => array ( 0 => 'function.quoted-printable-encode.php', 1 => 'quoted_printable_encode', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/strings/functions/quoted-printable-decode.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
quoted_printable_decode — quoted-printable 文字列を 8 ビット文字列に変換する
この関数は、quoted printable 文字列をデコードし、 8 ビットバイナリ文字列を返します (» RFC2821 の section 4.5.2 ではなく » RFC2045 の section 6.7 によれば、付随するピリオドは行の開始から削除されません) 。
この関数は imap_qprint() に似ていますが、 動作に IMAP モジュールを必要としないという違いがあります。
string
入力文字列。
8 ビットバイナリ文字列を返します。
例1 quoted_printable_decode() の例
<?php
$encoded = quoted_printable_encode('Möchten Sie ein paar Äpfel?');
var_dump($encoded);
var_dump(quoted_printable_decode($encoded));
?>
上の例の出力は以下となります。
string(37) "M=C3=B6chten Sie ein paar =C3=84pfel?" string(29) "Möchten Sie ein paar Äpfel?"