VMM: Show a warning when a unsupported locale setting was detected.
--- a/VirtualMailManager/__init__.py Sat Nov 05 16:41:19 2011 +0000
+++ b/VirtualMailManager/__init__.py Sat Nov 05 19:04:07 2011 +0000
@@ -10,6 +10,7 @@
import gettext
import locale
+import sys
from VirtualMailManager.constants import __author__, __date__, __version__
@@ -26,6 +27,8 @@
try:
locale.setlocale(locale.LC_ALL, '')
except locale.Error:
+ sys.stderr.write('warning: unsupported locale setting - '
+ 'that may cause encoding problems.\n\n')
locale.setlocale(locale.LC_ALL, 'C')
ENCODING = locale.nl_langinfo(locale.CODESET)