Changeset 1776 for pykota/trunk
- Timestamp:
- 10/05/04 11:41:13 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r1766 r1776 22 22 # 23 23 # $Log$ 24 # Revision 1.126 2004/10/05 09:41:13 jalet 25 # Small fix for errors caused by unknown locale 26 # 24 27 # Revision 1.125 2004/10/04 11:18:10 jalet 25 28 # Now exports the MD5 sum of the job's datas as an hexadecimal digest … … 513 516 # Else we use the current locale's one. 514 517 # If nothing is set, we use ISO-8859-15 widely used in western Europe. 515 self.charset = charset or os.environ.get("CHARSET") or locale.getlocale()[1] or locale.getdefaultlocale()[1] or "ISO-8859-15" 518 localecharset = locale.getlocale()[1] 519 try : 520 localecharset = localecharset or locale.getdefaultlocale()[1] 521 except ValueError : 522 pass # Unknown locale, strange... 523 self.charset = charset or os.environ.get("CHARSET") or localecharset or "ISO-8859-15" 516 524 517 525 # pykota specific stuff