[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/kmail
From:       Ingo Klöcker <kloecker () kde ! org>
Date:       2006-07-30 22:19:09
Message-ID: 1154297949.708144.17484.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 568026 by kloecker:

Fix bug 126837 (KMail does not correctly detect UTF-8 encoding)
Fall back to automatic encoding if we encounter an unknown encoding.

BUG: 126837



 M  +7 -0      configuredialog.cpp  
 M  +7 -0      kmreaderwin.cpp  


--- branches/KDE/3.5/kdepim/kmail/configuredialog.cpp #568025:568026
@@ -2309,6 +2309,13 @@
     }
     i++;
   }
+  if ( i == encodings.size() ) {
+    // the current value of overrideCharacterEncoding is an unknown encoding => reset to Auto
+    kdWarning(5006) << "Unknown override character encoding \"" << currentOverrideEncoding
+                    << "\". Resetting to Auto." << endl;
+    mOverrideCharsetCombo->setCurrentItem( 0 );
+    GlobalSettings::self()->setOverrideCharacterEncoding( QString::null );
+  }
 }
 
 void AppearancePage::ReaderTab::doLoadFromGlobalSettings()
--- branches/KDE/3.5/kdepim/kmail/kmreaderwin.cpp #568025:568026
@@ -1103,6 +1103,13 @@
           break;
         }
       }
+      if ( i == encodings.size() ) {
+        // the value of encoding is unknown => use Auto
+        kdWarning(5006) << "Unknown override character encoding \"" << encoding
+                        << "\". Using Auto instead." << endl;
+        mSelectEncodingAction->setCurrentItem( 0 );
+        mOverrideEncoding = QString::null;
+      }
     }
   }
   update( true );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic