fix an exception not correctly reporting if the locale is not set
fix it not setting the default locale

If LOCALE was not specified in the settings file it would default
to [] insted of [''], where '' is used by locale.setlocale
to mean the user's default locale.
added testing for default locale setting

removed LOCALE="" from default conf as it looks weird and you
shouldn't need to set a blank LOCALE for the system to work.
Merge pull request #968 from russkel/encodingfix

Fix setting default locale and exception encoding