Changeset 2195 for pykota/trunk
- Timestamp:
- 04/06/05 11:49:53 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r2193 r2195 24 24 - 1.22alpha4 : 25 25 26 - Fixed charset problem under MacOSX. 27 26 28 - Allows pkbanner to accept more info to display on its 27 29 command line. -
pykota/trunk/pykota/tool.py
r2147 r2195 92 92 try : 93 93 try : 94 # preferred method with Python 2.3 and up 95 localecharset = locale.getpreferredencoding() 94 localecharset = locale.nl_langinfo(locale.CODESET) 96 95 except AttributeError : 97 localecharset = locale.getlocale()[1]98 96 try : 99 localecharset = localecharset or locale.getdefaultlocale()[1] 100 except ValueError : 101 pass # Unknown locale, strange... 97 localecharset = locale.getpreferredencoding() 98 except AttributeError : 99 localecharset = locale.getlocale()[1] 100 try : 101 localecharset = localecharset or locale.getdefaultlocale()[1] 102 except ValueError : 103 pass # Unknown locale, strange... 102 104 except locale.Error : 103 105 pass