emerge: call setlocale() to enable system locale
This is necessary so that the size formatting function (and possibly
other locale-dependant functions in the future) respect the system
locale rather than using the 'C' locale.
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index cfe1332..eddb16c 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -3,6 +3,7 @@
from __future__ import print_function
+import locale
import platform
import sys
@@ -984,6 +985,9 @@
args = portage._decode_argv(args)
+ # Use system locale.
+ locale.setlocale(locale.LC_ALL, '')
+
# Disable color until we're sure that it should be enabled (after
# EMERGE_DEFAULT_OPTS has been parsed).
portage.output.havecolor = 0