'ValueError: unknown locale: UTF-8' problem in Mac OS X 10.5 Leoparad

Oscar Sanchez Casamitjana osc.lists at gmail.com
Sun Oct 28 07:49:52 CDT 2007


hi,

I don't know if this is the right place to ask, but I can't install
Mercurial via Macports (which uses Python 2.4.4) or via straight
source (with Python 2.5.1 that comes with the OS). this is what I get:

oscar$ sudo make install
python setup.py build
Traceback (most recent call last):
  File "setup.py", line 16, in <module>
    import mercurial.version
  File "/Users/oscar/Desktop/mercurial-0.9.5/mercurial/version.py",
line 16, in <module>
    import util
  File "/Users/oscar/Desktop/mercurial-0.9.5/mercurial/util.py", line
32, in <module>
    _encoding = locale.getlocale()[1]
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py",
line 460, in getlocale
    return _parse_localename(localename)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py",
line 373, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
make: *** [build] Error 1

I couldn't even do 'make' before, but Googleing arround found this:

http://www.selenic.com/mercurial/bts/issue600

and setting ' HGENCODING="UTF-8" solved the problem for that step. but
now that 'make install' requires 'sudoing' it doesn't seem to work.


thanks for your patience,
oscar.


More information about the Mercurial mailing list