Changeset 2334 in subversion
- Timestamp:
- Mar 6, 2009 3:52:21 PM (4 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 2 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r2333 r2334 2 2 =========================== 3 3 4 - Use US-ASCII as failover when Unicode searching fails (#1485762) 4 5 - Fix errors handling in IMAP command continuations (#1485762) 5 6 - Fix FETCH result parsing for servers returning flags at the end of result (#1485763) -
trunk/roundcubemail/program/include/rcube_imap.php
r2291 r2334 956 956 $results = $this->_search_index($mailbox, $str, $charset, $sort_field); 957 957 958 // try search with ISOcharset (should be supported by server)958 // try search with US-ASCII charset (should be supported by server) 959 959 // only if UTF-8 search is not supported 960 if (empty($results) && !is_array($results) && !empty($charset) && $charset!=' ISO-8859-1')961 { 962 // convert strings to ISO-8859-1960 if (empty($results) && !is_array($results) && !empty($charset) && $charset!='US-ASCII') 961 { 962 // convert strings to US_ASCII 963 963 if(preg_match_all('/\{([0-9]+)\}\r\n/', $str, $matches, PREG_OFFSET_CAPTURE)) 964 964 { … … 968 968 $string_offset = $m[1] + strlen($m[0]) + 4; // {}\r\n 969 969 $string = substr($str, $string_offset - 1, $m[0]); 970 $string = rcube_charset_convert($string, $charset, 'ISO-8859-1'); 970 $string = rcube_charset_convert($string, $charset, 'US-ASCII'); 971 if (!$string) continue; 971 972 $res .= sprintf("%s{%d}\r\n%s", substr($str, $last, $m[1] - $last - 1), strlen($string), $string); 972 973 $last = $m[0] + $string_offset - 1; … … 978 979 $res = $str; 979 980 980 $results = $this->search($mbox_name, $res, ' ISO-8859-1', $sort_field);981 $results = $this->search($mbox_name, $res, '', $sort_field); 981 982 } 982 983
Note: See TracChangeset
for help on using the changeset viewer.
