Status: New
Owner: ----
New issue 194 by puneetmadaan: locale exception
http://code.google.com/p/ulipad/issues/detail?id=194
What steps will reproduce the problem?
1. just start it in any mac machine...
What is the expected output? What do you see instead?
puneet-madaans-macbook-pro:ulipad puma2823$ python ulipad.py
Traceback (most recent call last):
File "ulipad.py", line 50, in <module>
ini = common.get_config_file_obj()
File "/Users/puma2823/Downloads/ulipad/modules/common.py", line 323, in
get_config_file_obj
_config_ini = dict4ini.DictIni(get_config_file(), *args, **kwargs)
File "/Users/puma2823/Downloads/ulipad/modules/dict4ini.py", line 258, in
__init__
self._encoding = getdefaultencoding(encoding)
File "/Users/puma2823/Downloads/ulipad/modules/dict4ini.py", line 606, in
getdefaultencoding
encoding = locale.getdefaultlocale()[1]
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py",
line 441, in getdefaultlocale
return _parse_localename(localename)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py",
line 373, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Please use labels and text to provide additional information.
i think it make sense to catch exception and using a default locale , as
en_US as default...
anyways other option is to put a shell script with two export statements..
puneet-madaans-macbook-pro:ulipad puma2823$ export LC_ALL=en_US.UTF-8
puneet-madaans-macbook-pro:ulipad puma2823$ export LANG=en_US.UTF-8
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings