[MacPorts] #21517: py26-eyed3-0.6.17 LookupError: unknown encoding: x-mac-japanese
MacPorts
noreply at macports.org
Mon Sep 21 14:13:33 PDT 2009
#21517: py26-eyed3-0.6.17 LookupError: unknown encoding: x-mac-japanese
---------------------------------+------------------------------------------
Reporter: null.atou@… | Owner: blb@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.0
Keywords: | Port: python26 python25
---------------------------------+------------------------------------------
Comment(by null.atou@…):
In Japanese environment, when make a new user, default LANG is set to
ja_JP.UTF-8. While a dot file ~/.CFUserTextEncoding(this file affects
!__CF_USER_TEXT_ENCODING) is '1:14'. '1' means that encoding is CP10001; x
-mac-japanese. But, we Japanese don't use x-mac-japanese but use UTF-8 in
Terminal. Yes, we prefer UTF-8, not x-mac-japanese.
At a glance, the way of python-issue-1276 seems adding encodings(x-mac-
japanese, etc.) to the table of codecs. But these patches don't correct
the locale problem in the environment of LANG=ja_JP.UTF-8, because LANG
was still ignored. And I found, in Python 3.1 (more correctly 3.1rc2),
they disappear the special routine for darwin or !__APPLE!__ that use
CoreFoundation function as mentioned above, so as to follow standard UNIX
manner. This change looks same as Apple's
[http://www.opensource.apple.com/source/python/python-44/2.6/fix/
patches].
{{{
% LANG=ja_JP.UTF-8 /usr/bin/python2.6 -c 'import locale;
print(locale.getpreferredencoding());'
UTF-8
% LANG=ja_JP.UTF-8 /opt/local/bin/python3.1 -c 'import locale;
print(locale.getpreferredencoding());'
UTF-8
% LANG=ja_JP.UTF-8 /opt/local/bin/python2.6 -c 'import locale;
print(locale.getpreferredencoding());'
x-mac-japanese # bad!
}}}
--
Ticket URL: <http://trac.macports.org/ticket/21517#comment:3>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list