Bug #53891 [Opn->Ver]: iconv_mime_encode() fails converting UTF-8 string to quoted-printable

From: Date: Wed, 09 Sep 2015 18:09:23 +0000
Subject: Bug #53891 [Opn->Ver]: iconv_mime_encode() fails converting UTF-8 string to quoted-printable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195925@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=53891&edit=1 ID: 53891 Updated by: cmb@php.net Reported by: can at strg dot at Summary: iconv_mime_encode() fails converting UTF-8 string to quoted-printable -Status: Open +Status: Verified Type: Bug Package: ICONV related Operating System: GNU/linux (gentoo/kernel 2.6.35) PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: Confirmed: <https://3v4l.org/JLman> Error 7 is likely E2BIG, what occurs if there's not enough room at *outbuf when calling iconv(). Previous Comments: ------------------------------------------------------------------------ [2011-01-31 14:25:20] can at strg dot at Description: ------------ iconv_mime_encode() fails on certain UTF-8 strings containing at least one multibyte character. The error is reproducable for these strings. I have further noticed that it is more likely that this error occurs if a multibyte character is found at the following character positions within the string: 24±1, 52±3, 82±4, 112±5, 143±5 The code that led me to the previous conclusion can be found here: http://pastebin.com/GXQZ129M Test script: --------------- $preferences = array( 'scheme' => 'Q', 'input-charset' => 'utf-8', 'output-charset' => 'utf-8', 'line-length' => 74, 'line-break-chars' => "\r\n", ); // Note the ellipsis character at the end of the following string: iconv_mime_encode('subject', "d obeybiubrsfqllpdtpge…", $preferences); Actual result: -------------- PHP Notice: iconv_mime_encode(): Unknown error (7) in /home/soulmerge/test.php on line 11 Notice: iconv_mime_encode(): Unknown error (7) in /home/soulmerge/test.php on line 11 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=53891&edit=1

« previous php.bugs (#195925) next »