Changeset 60 for python/trunk/Lib
- Timestamp:
- Oct 22, 2010, 10:46:09 PM (15 years ago)
- Location:
- python/trunk/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk/Lib/gettext.py
r2 r60 150 150 else: 151 151 codeset = '' 152 153 # use new os2 code to get current codepage 154 if pos == -1 and os.name == "os2": 155 import _locale 156 codeset = _locale._getdefaultlocale()[1] 157 mask |= COMPONENT_CODESET 158 152 159 pos = locale.find('_') 153 160 if pos >= 0: -
python/trunk/Lib/locale.py
r2 r60 342 342 encoding = '' 343 343 344 if sys.platform[:3] == "os2": 345 import _locale 346 langname, encoding = _locale._getdefaultlocale() 347 langname = langname.replace('_euro', '') 348 344 349 # First lookup: fullname (possibly with encoding) 345 350 norm_encoding = encoding.replace('-', '') … … 523 528 _setlocale(category, _build_localename(getdefaultlocale())) 524 529 525 if sys.platform in ('win32', 'darwin', 'mac' ):530 if sys.platform in ('win32', 'darwin', 'mac', 'os2knix'): 526 531 # On Win32, this will return the ANSI code page 527 532 # On the Mac, it should return the system encoding;
Note:
See TracChangeset
for help on using the changeset viewer.