Forum und email

mailparse_determine_best_xfer_encoding

(PHP 4 >= 4.0.7, PECL mailparse:0.9-2.1.1)

mailparse_determine_best_xfer_encoding — 最も適したエンコーディングを取得する

説明

string mailparse_determine_best_xfer_encoding ( resource $fp )

ファイルポインタから内容を読み込む際に最も適したエンコーディングを調べます。

パラメータ

fp

有効なファイルポインタ。これはシーク可能である必要があります。

返り値

mbstring モジュールがサポートする文字エンコーディングのいずれかを返します。

Example#1 mailparse_determine_best_xfer_encoding() の例

<?php

$fp 
fopen('somemail.eml''r');
echo 
'Best encoding: ' mailparse_determine_best_xfer_encoding($fp);

?>

上の例の出力は、たとえば 以下のようになります。

Best encoding: 7bit