diff options
Diffstat (limited to 'methods')
-rw-r--r-- | methods/aptmethod.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/methods/aptmethod.h b/methods/aptmethod.h index cf3496e45..bef61a8bc 100644 --- a/methods/aptmethod.h +++ b/methods/aptmethod.h @@ -46,7 +46,11 @@ public: aptMethod(char const * const Binary, char const * const Ver, unsigned long const Flags) : pkgAcqMethod(Ver, Flags), Binary(Binary) { - std::locale::global(std::locale("")); + try { + std::locale::global(std::locale("")); + } catch (...) { + setlocale(LC_ALL, ""); + } } }; |