'ValueError: unknown locale: UTF-8' problem in Mac OS X 10.5 Leopard [solved (more or less)]
Oscar Sanchez Casamitjana
osc.lists at gmail.com
Sun Oct 28 09:26:11 CDT 2007
On 10/28/07, Oscar Sanchez Casamitjana <osc.lists at gmail.com> wrote:
> On 10/28/07, Oscar Sanchez Casamitjana <osc.lists at gmail.com> wrote:
> > 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.
>
> [update] a friend of mine told me to do:
>
> $ export HGENCODING="UTF-8"
> $ sudo echo $HGENCODING
> UTF-8
>
> so the ENV is now right, but the build still fails:
>
> $ sudo make install
> [snipped code]
> ValueError: unknown locale: UTF-8
> make: *** [build] Error 1
>
> so now I'm really lost.
yes, it's me again. apparently the problem lays on (my) Terminal.app,
downloaded iTerm and worked without problems.
More information about the Mercurial
mailing list