CakeFest 2024: The Official CakePHP Conference

imap_mutf7_to_utf8

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

imap_mutf7_to_utf8修正UTF-7文字列をUTF-8にデコードする

説明

imap_mutf7_to_utf8(string $string): string|false

修正UTF-7(RFC 2060, section 5.1.3)文字列を UTF-8 にデコードします。

注意:

この関数は libcclient が utf8_to_mutf7() をエクスポートした場合にのみ利用できます。

パラメータ

string

修正UTF-7 でエンコードされた文字列

戻り値

string を UTF-8 に変換したものを返します。 失敗した場合に false を返します.

参考

add a note

User Contributed Notes 1 note

up
0
djmaze at snappymail dot eu
1 year ago
Currently imap_mutf7_to_utf8 doesn't support U+10000 and up.
You can test this with the teapot emoji 🫖
<?php
echo imap_utf8_to_mutf7('🫖') . "\n";
echo
bin2hex(imap_mutf7_to_utf8('&2D7e1g-')) . "\n";
?>
To Top