diff -r 21b31e9c20f3 -r f350021ee32e mercurial/config.py --- a/mercurial/config.py Mon Apr 02 17:02:50 2012 -0500 +++ b/mercurial/config.py Tue Apr 03 11:35:04 2012 -0500 @@ -115,6 +115,9 @@ for l in data.splitlines(True): line += 1 + if line == 1 and l.startswith('\xef\xbb\xbf'): + # Someone set us up the BOM + l = l[3:] if cont: if commentre.match(l): continue