# HG changeset patch # User Pascal Volk # Date 1320519847 0 # Node ID 2019aa415dcdf4850212467fc749356ab5aed3bc # Parent 7847f949d0a213848024acf5b9c2e6f7a7221591 VMM: Show a warning when a unsupported locale setting was detected. diff -r 7847f949d0a2 -r 2019aa415dcd VirtualMailManager/__init__.py --- 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)