#36806 [Opn->Csd]: iconv_mime_decode case-sensitivity for encoding token ('B' or 'Q')

From: Date: Mon, 20 Mar 2006 20:49:38 +0000
Subject: #36806 [Opn->Csd]: iconv_mime_decode case-sensitivity for encoding token ('B' or 'Q')
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94668@lists.php.net to get a copy of this message
ID: 36806 Updated by: tony2001@php.net Reported By: jgoldsmith at returnpath dot net -Status: Open +Status: Closed Bug Type: ICONV related Operating System: FC4 PHP Version: 5.1.2 New Comment: Fixed month ago. Previous Comments: ------------------------------------------------------------------------ [2006-03-20 21:42:31] jgoldsmith at returnpath dot net Description: ------------ iconv_mime_decode doesn't recognize lower-case encoding tokens ('b' or 'q'). These are acceptible according to the MIME RFC (http://www.ietf.org/rfc/rfc2047.txt). Here is a fix. Edit file: /ext/iconv/iconv.c Line: 1398 Change case 'B': to case 'B': case 'b': Line 1403 Change case 'Q': to case 'Q': case 'q': Reproduce code: --------------- $string = '=?UTF-8?b?VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZyE=?='; echo iconv_mime_decode($string,1); Expected result: ---------------- This is an encoded string! Actual result: -------------- Warning: iconv_mime_decode() [function.iconv-mime-decode]: Malformed string ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36806&edit=1

« previous php.bugs (#94668) next »