hg handles text file in unicode as binary file
Matt Mackall
mpm at selenic.com
Sun Mar 30 15:37:09 CDT 2008
On Sun, 2008-03-30 at 20:58 +0200, Gábor Farkas wrote:
> ibn at ikeeper.cn wrote:
> >
> > hg handles text file in unicode as binary file ? no diff or cat ?
> >
>
> you have to define what you mean by "unicode".
Mercurial internally treats all files the same - a sequence of bytes.
But a couple functions (diff in particular) make an attempt to
distinguish between so-called text and binary files by searching for NUL
bytes in the data. As a UTF-16 file will have lots of NULs in it, hg
diff will refuse to process it unless you give it the -a switch.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list