Ignore:
Timestamp:
Oct 22, 2010, 10:46:09 PM (15 years ago)
Author:
Yuri Dario
Message:

python: use current codepage as charset in locale settings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/trunk/Lib/locale.py

    r2 r60  
    342342        encoding = ''
    343343
     344    if sys.platform[:3] == "os2":
     345        import _locale
     346        langname, encoding = _locale._getdefaultlocale()
     347        langname = langname.replace('_euro', '')
     348
    344349    # First lookup: fullname (possibly with encoding)
    345350    norm_encoding = encoding.replace('-', '')
     
    523528    _setlocale(category, _build_localename(getdefaultlocale()))
    524529
    525 if sys.platform in ('win32', 'darwin', 'mac'):
     530if sys.platform in ('win32', 'darwin', 'mac', 'os2knix'):
    526531    # On Win32, this will return the ANSI code page
    527532    # On the Mac, it should return the system encoding;
Note: See TracChangeset for help on using the changeset viewer.