# HG changeset patch # User Matt Mackall # Date 1333470904 18000 # Node ID f350021ee32ed22b8bd7d3211a8899df0e3d6552 # Parent 21b31e9c20f3617f47db8ebc91d1ccf60055aca5 config: discard UTF-8 BOM if found 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