]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-main.cc
ignore std::locale exeception on non-existent "" locale
[apt.git] / apt-private / private-main.cc
index 0075f813f35fda73a97a2c4652096df631cf34ba..d6517dd2a7acd3d89c1ec90e782753b17d19a06c 100644 (file)
 
 void InitLocale(APT_CMD const binary)                          /*{{{*/
 {
-   std::locale::global(std::locale(""));
+   try {
+      std::locale::global(std::locale(""));
+   } catch (...) {
+      setlocale(LC_ALL, "");
+   }
    switch(binary)
    {
       case APT_CMD::APT: