[issue3409] 'annotate' moves utf-8 BOM, breaking the file.

Alberth bugs at mercurial.selenic.com
Mon Apr 30 06:16:25 CDT 2012


New submission from Alberth <alberth289346 at gmail.com>:

hg annotate prepends the revision number to before the BOM at the first
line, which breaks eg the python utf-8-sig reader.

$ xxd lang/russian.lng | head -1
0000000: efbb bf23 2367 7266 6c61 6e67 6964 2030  ...##grflangid 0
This is a valid utf-8 BOM at the start of the file.

$ hg annotate lang/russian.lng | xxd | head -1
0000000: 3236 3237 3a20 efbb bf23 2367 7266 6c61  2627: ...##grfla
And here it is an illegal utf-8 file, as the BOM is not at the start of the
file any more.

----------
messages: 19809
nosy: Alberth
priority: bug
status: unread
title: 'annotate' moves utf-8 BOM, breaking the file.

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3409>
____________________________________________________


More information about the Mercurial-devel mailing list