This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josm
Recipients josm
Date 2007-10-13.10:07:07
SpamBayes Score 0.019449655
Marked as misclassified No
Message-id <1192270029.29.0.976742738273.issue1276@psf.upfronthosting.co.za>
In-reply-to
Content
When I compile Python-3.0a1 on Mac OS X with Japanese locale,
I've got LookupError like below.

==========================================
running build_scripts
creating build/scripts-3.0
Traceback (most recent call last):
  File "./setup.py", line 1572, in <module>
    main()
  File "./setup.py", line 1567, in main
    'Lib/smtpd.py']
  File "/private/tmp/Python-3.0a1/Lib/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/private/tmp/Python-3.0a1/Lib/distutils/dist.py", line 943, in
run_commands
    self.run_command(cmd)
  File "/private/tmp/Python-3.0a1/Lib/distutils/dist.py", line 963, in
run_command
    cmd_obj.run()
  File "/private/tmp/Python-3.0a1/Lib/distutils/command/build.py", line
106, in run
    self.run_command(cmd_name)
  File "/private/tmp/Python-3.0a1/Lib/distutils/cmd.py", line 317, in
run_command
    self.distribution.run_command(command)
  File "/private/tmp/Python-3.0a1/Lib/distutils/dist.py", line 963, in
run_command
    cmd_obj.run()
  File
"/private/tmp/Python-3.0a1/Lib/distutils/command/build_scripts.py", line
51, in run
    self.copy_scripts()
  File
"/private/tmp/Python-3.0a1/Lib/distutils/command/build_scripts.py", line
82, in copy_scripts
    first_line = f.readline()
  File "/private/tmp/Python-3.0a1/Lib/io.py", line 1259, in readline
    decoder = self._decoder or self._get_decoder()
  File "/private/tmp/Python-3.0a1/Lib/io.py", line 1111, in _get_decoder
    make_decoder = codecs.getincrementaldecoder(self._encoding)
  File "/private/tmp/Python-3.0a1/Lib/codecs.py", line 951, in
getincrementaldecoder
    decoder = lookup(encoding).incrementaldecoder
LookupError: unknown encoding: X-MAC-JAPANESE
make: *** [sharedmods] Error 1
==========================================

This problem happens for lack of appropriate codec
so also occurs in apps using getdefaultencoding.

After patching Tools/unicode/Makefile and
running make generates build/mac_japanese.py, mac-japanese codec.
Files
File name Uploaded
x_mac_japanese.diff josm, 2007-10-13.10:07:08
History
Date User Action Args
2007-10-13 10:07:10josmsetspambayes_score: 0.0194497 -> 0.019449655
recipients: + josm
2007-10-13 10:07:09josmsetspambayes_score: 0.0194497 -> 0.0194497
messageid: <1192270029.29.0.976742738273.issue1276@psf.upfronthosting.co.za>
2007-10-13 10:07:09josmlinkissue1276 messages
2007-10-13 10:07:08josmcreate