This started recently, sometime last week's svn. the same server works fine with versions before that--
IIS7.5 (winserver2008r2 64bit) stock PHP install from microsoft web platform installer
Any ideas?
Thanks!!
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/KJ/yse6IvWJ/image001.png Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
S c o t t K r a m e r wrote:
IIS7.5 (winserver2008r2 64bit) stock PHP install from microsoft web platform installer
http://trac.roundcube.net/ticket/1486232
This could be platform dependent, because works for me on linux. Please try investigate rc_utf8_clean() function. Maybe it's iconv problem?
Hi Alec,
'iconv' works for me. This can't be the problem. Could you provide a string which is passed to 'rc_utf8_clean' by AJAX remotely?
Regards, Roland
Test script:
if(!iconv("UTF-8", "ISO-8859-1//IGNORE", '123€123')){ echo "failed"; } else{ echo "success: " . iconv("UTF-8", "ISO-8859-1//IGNORE", '123€123'); // expected output: 123123 }
----- Original Message ----- From: "A.L.E.C" alec@alec.pl Cc: dev@lists.roundcube.net Sent: Tuesday, October 20, 2009 8:10 AM Subject: Re: [RCD] email list showing zeros
S c o t t K r a m e r wrote:
IIS7.5 (winserver2008r2 64bit) stock PHP install from microsoft web platform installer
http://trac.roundcube.net/ticket/1486232
This could be platform dependent, because works for me on linux. Please try investigate rc_utf8_clean() function. Maybe it's iconv problem?
-- Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252 LAN Management System Developer http://lms.org.pl Roundcube Webmail Project Developer http://roundcube.net _______________________________________________ List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/
Roland Liebl wrote:
'iconv' works for me. This can't be the problem. Could you provide a string which is passed to 'rc_utf8_clean' by AJAX remotely?
this could be an array or string so, just add console($input) at the beginning of this function body and check logs/console.
if(!iconv("UTF-8", "ISO-8859-1//IGNORE", '123€123')){
Ok, but test with UTF8//IGNORE
OK this fails:
<?php if(!iconv("UTF-8", "UTF8//IGNORE", '123€123')){ echo "failure"; } else{ echo "success"; } ?>
----- Original Message ----- From: "A.L.E.C" alec@alec.pl Cc: dev@lists.roundcube.net Sent: Wednesday, October 21, 2009 8:18 AM Subject: Re: [RCD] email list showing zeros
Roland Liebl wrote:
'iconv' works for me. This can't be the problem. Could you provide a string which is passed to 'rc_utf8_clean' by AJAX remotely?
this could be an array or string so, just add console($input) at the beginning of this function body and check logs/console.
if(!iconv("UTF-8", "ISO-8859-1//IGNORE", '123€123')){
Ok, but test with UTF8//IGNORE
-- Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252 LAN Management System Developer http://lms.org.pl Roundcube Webmail Project Developer http://roundcube.net
List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/
Roland Liebl wrote:
OK this fails:
<?php if(!iconv("UTF-8", "UTF8//IGNORE", '123€123')){ echo "failure"; } else{ echo "success"; }
I don't know why, but we have:
if (function_exists('iconv')) return iconv('UTF8', 'UTF8//IGNORE', $input);
So, I think we could handle this issue with:
if (function_exists('iconv') && ($result = iconv('UTF8', 'UTF8//IGNORE', $input))) return $result;
A.L.E.C wrote:
if (function_exists('iconv') && ($result = iconv('UTF8', 'UTF8//IGNORE', $input))) return $result;
I've found that some iconv implementations does not support "//IGNORE". Also we can do this with mbstring. Here's a complete patch, please confirm it works (do testing also with commented out mb_convert_encoding's if block).
--- rcube_shared.inc (wersja 3049) +++ rcube_shared.inc (kopia robocza) @@ -599,13 +599,16 @@ return $input; }
mb_convert_encoding($input, 'UTF8', 'UTF8')))
return $res;
if (function_exists('iconv') && ($res = iconv('UTF8', 'UTF8//IGNORE',
$input)))
Works with both, 'mb_convert_encoding' active or commented out. Thanks!
----- Original Message ----- From: "A.L.E.C" alec@alec.pl To: dev@lists.roundcube.net Sent: Thursday, October 22, 2009 10:34 AM Subject: Re: [RCD] email list showing zeros
A.L.E.C wrote:
if (function_exists('iconv') && ($result = iconv('UTF8', 'UTF8//IGNORE', $input))) return $result;
I've found that some iconv implementations does not support "//IGNORE". Also we can do this with mbstring. Here's a complete patch, please confirm it works (do testing also with commented out mb_convert_encoding's if block).
--- rcube_shared.inc (wersja 3049) +++ rcube_shared.inc (kopia robocza) @@ -599,13 +599,16 @@ return $input; }
- if (!is_string($input))
- if (!is_string($input) || $input == '') return $input;
- // iconv is 10x faster
- if (function_exists('iconv'))
- return iconv('UTF8', 'UTF8//IGNORE', $input);
- // iconv/mbstring are much faster (especially with long strings)
- if (function_exists('mb_convert_encoding') && ($res =
mb_convert_encoding($input, 'UTF8', 'UTF8')))
return $res;
if (function_exists('iconv') && ($res = iconv('UTF8', 'UTF8//IGNORE',
$input)))
- return $res;
- $regexp = '/^('.
// '[\x00-\x7F]'. // UTF8-1 '|[\xC2-\xDF][\x80-\xBF]'. // UTF8-2
-- Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252 LAN Management System Developer http://lms.org.pl Roundcube Webmail Project Developer http://roundcube.net _______________________________________________ List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/