ID: 44098 Comment by: sebastian dot gerlach at digionline dot de Reported By: steffen at dislabs dot de Status: No Feedback Bug Type: IMAP related Operating System: FreeBSD 6.2 PHP Version: 5.2.5 Assigned To: pajoye New Comment:
Complete patch for 5.3.1: *** configure 2009-11-18 21:11:57.000000000 +0100 --- configure.new 2009-12-22 18:36:30.000000000 +0100 *************** *** 47697,47703 **** CFLAGS="-I$IMAP_INC_DIR" echo $ac_n "checking for U8T_CANONICAL""... $ac_c" 1>&6 echo "configure:47700: checking for U8T_CANONICAL" >&5 ! if eval "test \"`echo '$''{'ac_cv_u8t_canonical'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF --- 47697,47703 ---- CFLAGS="-I$IMAP_INC_DIR" echo $ac_n "checking for U8T_CANONICAL""... $ac_c" 1>&6 echo "configure:47700: checking for U8T_CANONICAL" >&5 ! if eval "test \"`echo '$''{'ac_cv_u8t_decompose'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF *************** *** 47715,47741 **** if { (eval echo configure:47716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ! ac_cv_u8t_canonical=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ! ac_cv_u8t_canonical=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_u8t_canonical" 1>&6 CFLAGS=$old_CFLAGS ! if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then { echo "configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." 1>&2; exit 1; } fi ! if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then { echo "configure: error: utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." 1>&2; exit 1; } fi --- 47715,47741 ---- if { (eval echo configure:47716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ! ac_cv_u8t_decompose=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ! ac_cv_u8t_decompose=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_u8t_decompose" 1>&6 CFLAGS=$old_CFLAGS ! if test "$ac_cv_u8t_decompose" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then { echo "configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." 1>&2; exit 1; } fi ! if test "$ac_cv_u8t_decompose" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then { echo "configure: error: utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." 1>&2; exit 1; } fi *** ext/imap/config.m4 2009-05-05 03:22:44.000000000 +0200 --- ext/imap/config.m4.new 2009-12-22 18:39:16.000000000 +0100 *************** *** 147,169 **** old_CFLAGS=$CFLAGS CFLAGS="-I$IMAP_INC_DIR" ! AC_CACHE_CHECK(for U8T_CANONICAL, ac_cv_u8t_canonical, AC_TRY_COMPILE([ #include <c-client.h> ],[ int i = U8T_CANONICAL; ],[ ! ac_cv_u8t_canonical=yes ],[ ! ac_cv_u8t_canonical=no ]) ) CFLAGS=$old_CFLAGS ! if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then AC_MSG_ERROR([utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.]) fi ! if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then AC_MSG_ERROR([utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information.]) fi --- 147,169 ---- old_CFLAGS=$CFLAGS CFLAGS="-I$IMAP_INC_DIR" ! AC_CACHE_CHECK(for U8T_DECOMPOSE, ac_cv_u8t_canonical, AC_TRY_COMPILE([ #include <c-client.h> ],[ int i = U8T_CANONICAL; ],[ ! ac_cv_u8t_decompose=yes ],[ ! ac_cv_u8t_decompose=no ]) ) CFLAGS=$old_CFLAGS ! if test "$ac_cv_u8t_decompose" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then AC_MSG_ERROR([utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.]) fi ! if test "$ac_cv_u8t_decompose" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then AC_MSG_ERROR([utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information.]) fi *** ext/imap/php_imap.c 2009-10-09 19:38:19.000000000 +0200 --- ext/imap/php_imap.c.new 2009-12-22 18:52:19.000000000 +0100 *************** *** 2598,2604 **** #ifndef HAVE_NEW_MIME2TEXT utf8_mime2text(&src, &dest); #else ! utf8_mime2text(&src, &dest, U8T_CANONICAL); #endif RETVAL_STRINGL(dest.data, dest.size, 1); if (dest.data) { --- 2598,2604 ---- #ifndef HAVE_NEW_MIME2TEXT utf8_mime2text(&src, &dest); #else ! utf8_mime2text(&src, &dest, U8T_DECOMPOSE); #endif RETVAL_STRINGL(dest.data, dest.size, 1); if (dest.data) { Previous Comments: ------------------------------------------------------------------------ [2009-11-06 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-10-29 22:58:42] paj...@php.net It looks like your patch was truncated. Can you post a link to it or send it to me please? ------------------------------------------------------------------------ [2009-10-29 22:54:08] sbs at hushmail dot com This is because if you compile against a recent version of the imap c-client library, the U8T_CANONICAL flag is passed to utf8_mime2text, which canonicalizes case. To fix, instead the U8T_DECOMPOSE compose flag can be used. No flag at all would likely be fine as well. Here's a patch I used against 5.2.11. diff -r -u php-5.2.11/configure php-5.2.11-u8t_decompose-patch/configure +++ php-5.2.11-u8t_decompose-patch/configure 2009-10-29 15:23:14.000000000 -0700 -if eval "test \"`echo '$''{'ac_cv_u8t_canonical'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_u8t_decompose'+set}'`\" = set"; then - ac_cv_u8t_canonical=yes + ac_cv_u8t_decompose=yes - ac_cv_u8t_canonical=no + ac_cv_u8t_decompose=no -echo "$ac_t""$ac_cv_u8t_canonical" 1>&6 +echo "$ac_t""$ac_cv_u8t_decompose" 1>&6 - if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then + if test "$ac_cv_u8t_decompose" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then - if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then + if test "$ac_cv_u8t_decompose" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then diff -r -u php-5.2.11/ext/imap/config.m4 php-5.2.11-u8t_decompose-patch/ext/imap/config.m4 +++ php-5.2.11-u8t_decompose-patch/ext/imap/config.m4 2009-10-29 15:21:22.000000000 -0700 - AC_CACHE_CHECK(for U8T_CANONICAL, ac_cv_u8t_canonical, + AC_CACHE_CHECK(for U8T_DECOMPOSE, ac_cv_u8t_decompose, - ac_cv_u8t_canonical=yes + ac_cv_u8t_decompose=yes - ac_cv_u8t_canonical=no + ac_cv_u8t_decompose=no - if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then + if test "$ac_cv_u8t_decompose" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then - if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then + if test "$ac_cv_u8t_decompose" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then diff -r -u php-5.2.11/ext/imap/php_imap.c php-5.2.11-u8t_decompose-patch/ext/imap/php_imap.c +++ php-5.2.11-u8t_decompose-patch/ext/imap/php_imap.c 2009-10-29 15:21:38.000000000 -0700 ------------------------------------------------------------------------ [2009-07-10 20:53:54] ftourist at yahoo dot com Same bug on Windows Server 2008 Installed using php-5.3.0-nts-Win32-VC9-x86.msi ------------------------------------------------------------------------ [2009-04-15 08:39:21] tristan at byte dot nl We experience the same bug using php 5.2.9 on Debian Etch PHP 5.2.9-1byte1 (cli) (built: Mar 25 2009 17:08:35) 5.2.9.dfsg.1-1byte1 (5.2.9.dfsg.1-1, with some custom patches not related to utf8 or imap). libc-client is libc-client2007b (2007b~dfsg-2byte0etch0) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44098 -- Edit this bug report at http://bugs.php.net/?id=44098&edit=1