mercurial error ‘ValueError: unknown locale: UTF-8′ on MacOS 10.5

Having installed mercurial via macports, any hg command fails with:

   <nasty Traceback snipped>
   ValueError: unknown locale: UTF-8

This is mercurial 0.9.5 and Python 2.5.1, but its seem that its caused by Leopard’s Term.app not setting the local encoding correctly. To resolve this, add the following to .profile:

   export LC_ALL=en_US.UTF-8
   export LANG=en_US.UTF-8

as noted in the mercurial mailing list.

0 Responses to “mercurial error ‘ValueError: unknown locale: UTF-8′ on MacOS 10.5”


  1. No Comments

Leave a Reply

You must login to post a comment.