Bug 439365 - Wrong comparison results when one of the files has UTF8-BOM encoding.
Summary: Wrong comparison results when one of the files has UTF8-BOM encoding.
Status: RESOLVED FIXED
Alias: None
Product: kdiff3
Classification: Applications
Component: application (other bugs)
Version First Reported In: 1.9.2
Platform: Microsoft Windows Microsoft Windows
: NOR critical
Target Milestone: ---
Assignee: michael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-01 09:21 UTC by Dmitry.Sokolov
Modified: 2021-07-08 20:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 1.9.3
Sentry Crash Report:


Attachments
result_1.9.2.png (15.15 KB, image/png)
2021-07-01 09:22 UTC, Dmitry.Sokolov
Details
result_0.9.98.png (13.75 KB, image/png)
2021-07-01 09:22 UTC, Dmitry.Sokolov
Details
a.cpp (55 bytes, text/plain)
2021-07-01 09:22 UTC, Dmitry.Sokolov
Details
b.cpp (58 bytes, text/plain)
2021-07-01 09:23 UTC, Dmitry.Sokolov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry.Sokolov 2021-07-01 09:21:37 UTC
SUMMARY
Wrong comparison results when one of the files has UTF8-BOM encoding.

STEPS TO REPRODUCE
1. Open kdiff3 v1.9.2 to compare a.cpp and b.cpp

OBSERVED RESULT
see attachment result_1.9.2.png


EXPECTED RESULT
see attachment result_0.9.98.png
Comment 1 Dmitry.Sokolov 2021-07-01 09:22:15 UTC
Created attachment 139776 [details]
result_1.9.2.png
Comment 2 Dmitry.Sokolov 2021-07-01 09:22:33 UTC
Created attachment 139777 [details]
result_0.9.98.png
Comment 3 Dmitry.Sokolov 2021-07-01 09:22:50 UTC
Created attachment 139778 [details]
a.cpp
Comment 4 Dmitry.Sokolov 2021-07-01 09:23:03 UTC
Created attachment 139779 [details]
b.cpp
Comment 5 michael 2021-07-08 20:35:26 UTC
Git commit 01e94170f3a1bed1c06c6cc57b40ec7163fca6f8 by Michael Reeves.
Committed on 08/07/2021 at 20:34.
Pushed by mreeves into branch 'master'.

Restore custom codec.

Document QTextCodec behavior in regard to registration.  Move the creatation of UTF8BOMCodec to main.cpp.
Was originally inside the options dialog creation .
FIXED-IN:1.9.3

M  +2    -1    src/SourceData.cpp
A  +54   -0    src/UTF8BOMCodec.h     [License: GPL(v2.0+)]
M  +9    -0    src/main.cpp

https://invent.kde.org/sdk/kdiff3/commit/01e94170f3a1bed1c06c6cc57b40ec7163fca6f8
Comment 6 michael 2021-07-08 20:36:04 UTC
Git commit 62a90288bd1b1a83aaed9ae565fc79ec9f2260f2 by Michael Reeves.
Committed on 08/07/2021 at 20:32.
Pushed by mreeves into branch '1.9'.

Restore custom codec.

Document QTextCodec behavior in regard to registration.  Move the creatation of UTF8BOMCodec to main.cpp.
Was originally inside the options dialog creation .
FIXED-IN:1.9.3
(cherry picked from commit ac8b825c7b51297650a5b149f7280fe0f6ee916d)

M  +2    -1    src/SourceData.cpp
A  +54   -0    src/UTF8BOMCodec.h     [License: GPL(v2.0+)]
M  +9    -0    src/main.cpp

https://invent.kde.org/sdk/kdiff3/commit/62a90288bd1b1a83aaed9ae565fc79ec9f2260f2