summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-main.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-private/private-main.cc b/apt-private/private-main.cc
index 0075f813f..d6517dd2a 100644
--- a/apt-private/private-main.cc
+++ b/apt-private/private-main.cc
@@ -18,7 +18,11 @@
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: