detecting character in a NO response propably means:
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 10 Feb 2006 19:00:11 +0000 (19:00 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 10 Feb 2006 19:00:11 +0000 (19:00 +0000)
Unrecognized character set or
character set is not supported

In other words, it's very certain the NO is caused by an unsupported
charset.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10686 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_messages.php

index 05fc99d74f3e0278c1d24ba526569d6649cafd89..a964e6cc6c7e9047002995880bee93ed69835293 100755 (executable)
@@ -167,7 +167,7 @@ function sqimap_get_sort_order($imap_stream, $sSortField, $reverse, $search='ALL
         /* fallback to default charset */
         if ($response == 'NO') {
             if (strpos($message,'[BADCHARSET]') !== false ||
-                strpos($message,'Unrecognized character set') !== false) {
+                strpos($message,'character') !== false) {
                 sqm_trigger_imap_error('SQM_IMAP_BADCHARSET',$query, $response, $message);
                 $query = "SORT ($sSortField) US-ASCII $search";
                 $aData = sqimap_run_command_list ($imap_stream, $query, true, $response, $message, TRUE);
@@ -441,7 +441,7 @@ function get_thread_sort($imap_stream, $search='ALL') {
 
     if ($response == 'NO') {
         if (strpos($message,'[BADCHARSET]') !== false ||
-            strpos($message,'Unrecognized character set') !== false) {
+            strpos($message,'character') !== false) {
             sqm_trigger_imap_error('SQM_IMAP_BADCHARSET',$query, $response, $message);
             $query = "THREAD $sort_type US-ASCII $search";
             $thread_test = sqimap_run_command ($imap_stream, $query, true, $response, $message, TRUE);