# HG changeset patch # User Matt Mackall # Date 1165184193 21600 # Node ID 96095d9ff1f82c74304dd4c78d1ae4928dd4034a # Parent 6ae3685be45d0a629d41758c958094b4467c904a Add encoding detection diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -15,7 +15,9 @@ platform-specific details from the core. from i18n import gettext as _ from demandload import * demandload(globals(), "cStringIO errno getpass popen2 re shutil sys tempfile") -demandload(globals(), "os threading time calendar ConfigParser") +demandload(globals(), "os threading time calendar ConfigParser locale") + +_encoding = os.environ.get("HGENCODING") or locale.getpreferredencoding() # used by parsedate defaultdateformats = ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M',