[PATCH 0 of 2] add support for Mercurial.ini with BOM (issue2162)

Yuya Nishihara yuya at tcha.org
Sat Jun 19 08:56:33 CDT 2010


In a nutshell, this adds the support for UTF-8-encoded Mercurial.ini
edited by Notepad.exe.

Some text editors prepend BOM (byte-order-mark) before the content
when saving it as UTF-8. This causes parse error on Mercurial, but
it's hard to get the reason because BOM sequence is invisible from users.

The first patch implements BOM handling functions. It also supports
UTF-16 and UTF-32.
The second patch changes config.read() to handle BOM.

JFTR, I don't like the behavior like Notepad.exe, but it's popular
software. ;)


More information about the Mercurial-devel mailing list