]> git.saurik.com Git - apt.git/blobdiff - methods/aptmethod.h
edsp: optionally store a compressed copy of the last scenario
[apt.git] / methods / aptmethod.h
index f8a68c92bae34218b651ef7b49c7ee55e4a3a789..bef61a8bc6c8a32a60952cf3c5af9233832d5087 100644 (file)
@@ -4,6 +4,7 @@
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/configuration.h>
 
+#include <locale>
 #include <string>
 
 class aptMethod : public pkgAcqMethod
@@ -44,7 +45,13 @@ public:
 
    aptMethod(char const * const Binary, char const * const Ver, unsigned long const Flags) :
       pkgAcqMethod(Ver, Flags), Binary(Binary)
-   {}
+   {
+      try {
+        std::locale::global(std::locale(""));
+      } catch (...) {
+        setlocale(LC_ALL, "");
+      }
+   }
 };
 
 #endif