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

List:       kde-commits
Subject:    branches/KDE/4.1/kdelibs/solid/solid/backends/hal
From:       Nickolai Shaforostoff <shafff () ukr ! net>
Date:       2008-09-12 21:25:40
Message-ID: 1221254740.611856.24335.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 860385 by shaforo:

ok, use DOS code pages as people ask


 M  +33 -28    halstorageaccess.cpp  


--- branches/KDE/4.1/kdelibs/solid/solid/backends/hal/halstorageaccess.cpp #860384:860385
@@ -234,37 +234,42 @@
     if (halOptions.contains("uid=")) {
         options << "uid="+QString::number(::getuid());
     }
-    //respect windows-enforced charsets for fat
+    //respect window$-enforced charsets for fat
     if ( m_device->property("volume.fstype").toString()=="vfat" && halOptions.contains("codepage=") ) {
-        options << "iocharset=utf8";
+        QString codepage;
         switch (QLocale::system().language()) {
-        case QLocale::Russian:
-        case QLocale::Ukrainian:
-            options << "codepage=1251";
-            break;
-        case QLocale::Hebrew:
-            options << "codepage=1255";
-            break;
-        case QLocale::Turkish:
-            options << "codepage=1254";
-        case QLocale::Greek:
-            options << "codepage=1253";
-        case QLocale::Arabic:
-            options << "codepage=1256";
-        case QLocale::German:
-        case QLocale::Italian:
-        case QLocale::Spanish:
-        case QLocale::Portuguese:
-        case QLocale::French:
-        case QLocale::Dutch:
-        case QLocale::Danish:
-        case QLocale::Swedish:
-        case QLocale::Norwegian:
-        case QLocale::Icelandic:
-            options << "codepage=1255";
-        default:
-            options.removeLast();
+            case QLocale::Russian:
+            case QLocale::Ukrainian:
+            case QLocale::Byelorussian:
+            case QLocale::Bulgarian:
+                codepage = "codepage=855";
+                break;
+            case QLocale::German:
+            case QLocale::Italian:
+            case QLocale::Spanish:
+            case QLocale::French:
+            case QLocale::Dutch:
+            case QLocale::Danish:
+            case QLocale::Swedish:
+            case QLocale::Norwegian:
+            case QLocale::Icelandic:
+            case QLocale::English:
+                codepage = "codepage=850";
+                break;
+            case QLocale::Portuguese:
+                codepage = "codepage=860";
+                break;
+            case QLocale::Hebrew:
+                codepage = "codepage=1255";
+                break;
+            case QLocale::Turkish:
+                codepage = "codepage=857";
+                break;
         }
+        if (!codepage.isEmpty()) {
+            options << codepage;
+            options << "iocharset=utf8";
+        }
     }
 
     msg << "" << "" << options;
[prev in list] [next in list] [prev in thread] [next in thread] 

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