UTF8 with BOM and hgrc

Matt Mackall mpm at selenic.com
Tue Apr 3 19:54:16 UTC 2012


[please don't post through Google Groups!]

On Tue, 2012-04-03 at 08:21 -0700, Alexander Leschinsky wrote:
> I know, it's unusual case, but:
> 
> Can Mercurial be more tolerated to ini-files in UTF8 (yes, bad) with BOM 
> (yes, more worse)?

All my config files are UTF-8, so that much is just fine. But UTF-8 is
not really a well-supported codepage on Windows (cp65535 kinda sorta
works) and unless you're using that codepage, Mercurial won't do the
right thing with your non-ASCII characters.

As for the BOM, whoever thought that a) UTF-16 byte order shouldn't be
well-defined and b) adding a magic marker to all files would solve the
problem was an idiot. But he was a lot smarter than the guy who thought
specifying a UTF-8 BOM was a good idea.

I've committed a fix for this issue, but only because I got to write an
amusing comment while doing so.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list