RELEASED: Python 2.3a2

SUZUKI Hisao suzuki611 at oki.com
Thu Feb 20 20:21:17 EST 2003


> Python 2.3a2 is the second (and likely last) alpha release of Python
> 2.3.  Much improved since the first alpha, chockfull of things you'd
> like to check out:
> 
>   http://www.python.org/2.3/

If you install it cleanly on Windows in Japanese locale, you
cannot even start up the IDLE.  Perhaps you cannot do it also in
Chinese and Korean locales.

In that case, just put the following as
C:\Python23\Lib\site-packages\sitecustomize.py
----------------------------------------------------------------
# On Windows, some default encodings are not provided
# by Python (e.g. "cp932" in Japanese locale), while they
# are always available as "mbcs" in each locale.
# Ensure them usable by aliasing to "mbcs" in such case.

import sys
if sys.platform == 'win32':
    import locale, codecs
    enc = locale.getdefaultlocale()[1]
    if enc.startswith('cp'):            # "cp***" ?
        try:
            codecs.lookup(enc)
        except LookupError:
            import encodings
            encodings._cache[enc] = encodings._unknown
            encodings.aliases.aliases[enc] = 'mbcs'
----------------------------------------------------------------

(I have already posted the patch with a bit of different flavor
to sf.net as Request ID 671666 on 21 Jan 2003; however, it seems
to have been simply ignored.  I am afraid the problem may be
critical to many pythoneers in East Asia.)

-- SUZUKI Hisao





More information about the Python-list mailing list