[MacPorts] #20730: Mercurial appears to require LANG and LC_ALL set to UTF8

MacPorts noreply at macports.org
Mon Sep 7 07:47:09 PDT 2009


#20730: Mercurial appears to require LANG and LC_ALL set to UTF8
----------------------------------+-----------------------------------------
 Reporter:  ora.et.labora@…       |       Owner:  deric@…           
     Type:  defect                |      Status:  new               
 Priority:  Normal                |   Milestone:                    
Component:  ports                 |     Version:  1.7.1             
 Keywords:                        |        Port:  mercurial         
----------------------------------+-----------------------------------------

Comment(by stephen@…):

 You probably also live in an ASCII-speaking territory.  Here's what
 happens in Japan:
 {{{
 wideload:src/MacPorts 23:38$ hg version
 Traceback (most recent call last):
   File "/opt/local/bin/hg", line 27, in <module>
     mercurial.dispatch.run()
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/dispatch.py", line 16, in run
     sys.exit(dispatch(sys.argv[1:]))
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/dispatch.py", line 27, in dispatch
     return _runcatch(u, args)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/dispatch.py", line 144, in _runcatch
     ui.warn(_("** unknown exception encountered, details follow\n"))
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/i18n.py", line 43, in gettext
     return u.encode(encoding.encoding, "replace")
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/demandimport.py", line 75, in __getattribute__
     self._load()
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/demandimport.py", line 47, in _load
     mod = _origimport(head, globals, locals)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/encoding.py", line 20, in <module>
     encoding = locale.getlocale()[1]
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py",
 line 497, in getlocale
     return _parse_localename(localename)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py",
 line 410, in _parse_localename
     raise ValueError, 'unknown locale: %s' % localename
 ValueError: unknown locale: UTF-8
 }}}
 Mercurial is the only Python app that does this to me.
 Even more brain-damaged, to override this you must set LC_CTYPE or LC_ALL.
 LANG is not good enough.
 {{{
 Mac OS X 10.5.8 "Leopard"
 MacBook Pro (Intel Core Duo)
 MacPorts from svn (up to date at r57210; port last built and installed
 about 2009/09/02)
 mercurial @1.3.1_0 (active)
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/20730#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list