https://bz.mercurial-scm.org/show_bug.cgi?id=5590

            Bug ID: 5590
           Summary: Change in encoding is not detected as a change by
                    Mercurial
           Product: Mercurial
           Version: 4.2.1
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzi...@mercurial-scm.org
          Reporter: la...@lassekliemann.de
                CC: mercurial-devel@mercurial-scm.org

The following script demonstrates the problem. A file 'f' is created with a
single umlaut, then converted from the default UTF-8 to ISO-8859-1 (this step
should not be important) and then added and committed. Then the encoding is
changed from ISO-8859-1 to MacCentralEurope. The file *is* different as proven
by a comparison with the backup copy 'g'. However, neither 'hg st' nor 'hg
diff' nor 'hg ci' recognize any change. This is creating severe problems here,
and any help is very much appreciated. Thanks!

As far as I understand, Mercurial does not care about the encoding of file
content but just treats the file 'as is'. So the change in encoding should be
recognized as a change in the file.

$ hg init test.hg
$ cd test.hg
$ echo 'รค' > f
$ recode UTF-8..ISO-8859-1 f
$ file f
f: ISO-8859 text
$ hg add f
$ hg ci -m na
$ hg st
$ cp f g
$ recode ISO-8859-1..MacCentralEurope f
$ file f
f: Non-ISO extended-ASCII text
$ hg st
? g
$ hg diff
$ hg ci
nothing changed
$ cmp f g
f g differ: byte 1, line 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to