#2131 In FolderCompare mode text encoding only gets checked when refreshing the folder


...whereas it ought to check the file encoding every time it opens the files, otherwise you get error messages / display issues.

Let me explain:
In the attachement there's two UTF-8 encoded files in two folders, and the files are identical except for the first character (so that WinMerge will (intentionally) always detect that they're different).
Do a FolderCompare on dirA and dirB, and WinMerge correctly detects that the files are different. Double-click on the file to display the differences, and note that WinMerge has correctly detected each file as being UTF-8.
Now close the file-compare window to go back to the folder-compare window.
In your favourite external text-editor of choice, now SaveAs one of the files in Windows-1252 mode.
Go back to WinMerge, and double-click on the file again.
You get an error dialog popup saying "Information lost due to encoding errors: left file" (or ": right file" if you modified the right file). Click OK and WinMerge thinks the file that you modified is still UTF-8, and displays the second line as "�5".
Close the file-compare window to go back to the folder-compare view and double-click on the file - you get the same error again.
Close the file-compare window again, and now click "Refresh" in the folder-compare view. Double-click on the file again, and this time there's no error, WinMerge has now correctly identified the modified file as "1252", and it correctly displays the second line as "£5".

The same error works the "other way" too, i.e. now that the folder-compare thinks that one of the files is 1252, close the file-compare view, go back to your external text-editor and SaveAs the same file as UTF8 again. Go back to WinMerge, double-click the file, and the file-compare view still thinks the modified file is "1252" and displays the second line as "£5". Close the file-compare window, click "Refresh", double-click the file, and WinMerge now correctly identifies the file as UTF-8 again, and displays the second line correctly.

Both these problems would be fixed if you did the "is the file utf8" check every time you open a file for viewing differences, and not just when refreshing folder-compare mode.

WinMerge configuration log

Saved to: C:\Users\Andrew\Documents\WinMerge\WinMerge.txt
Please add this information (or attach this file)
when reporting bugs.
Module names prefixed with tilda (~) are currently loaded in WinMerge process.

Version information:
Build config: UNICODE _UNICODE
Command Line: "D:\WinMergeTest\dirA" "D:\WinMergeTest\dirB"
Windows: Microsoft Windows 7 Home Edition Service Pack 1 (Build 7601)
~COMCTL32.dll dllversion=6.16 dllbuild=7601
~shlwapi.dll dllversion=6.01 dllbuild=7601
MergeLang.dll version=2.14 build=0000
ShellExtension.dll version=0.00 build=0000
ShellExtensionU.dll version=0.00 build=0000
ShellExtensionX64.dll version=1.16 build=0008

WinMerge configuration:
Compare settings:
Ignore blank lines: No
Ignore case: No
Ignore carriage return differences: No
Whitespace compare: Compare all
Detect moved blocks: No
Compare method: 0
Stop after first diff: No

Other settings:
Automatic rescan: No
Simple EOL: Yes
Automatic scroll to 1st difference: No
Backup original file: No

Folder compare:
Identical files: No
Different files: Yes
Left Unique files: Yes
Right Unique files: Yes
Binary files: Yes
Skipped files: Yes
Tree-mode enabled: No

File compare:
Preserve filetimes: No
Match similar lines: No

Editor settings:
View Whitespace: No
Merge Mode enabled: No
Show linenumbers: No
Wrap lines: No
Syntax Highlight: Yes
Tab size: 4
Insert tabs: Yes

Font facename: Courier New
Font charset: 0 (Ansi)

System settings:
codepage settings:
ANSI codepage: 1252
OEM codepage: 850
Locale (Thread):
Def ANSI codepage: 1252
Def OEM codepage: 437
Country: United States
Language: English
Language code: 0409
ISO Language code: en
Locale (User):
Def ANSI codepage: 1252
Def OEM codepage: 850
Country: United Kingdom
Language: English
Language code: 0809
ISO Language code: en
Locale (System):
Def ANSI codepage: 1252
Def OEM codepage: 850
Country: United Kingdom
Language: English
Language code: 0809
ISO Language code: en
Detect codepage automatically for RC and HTML files: No
unicoder codepage: 1252

Plugins enabled: No
CompareMSExcelFiles.dll [C:\Program Files (x86)\WinMerge\MergePlugins\CompareMSExcelFiles.dll]
CompareMSWordFiles.dll [C:\Program Files (x86)\WinMerge\MergePlugins\CompareMSWordFiles.dll]
DisplayXMLFiles.dll [C:\Program Files (x86)\WinMerge\MergePlugins\DisplayXMLFiles.dll]
WatchBeginningOfLog.dll [C:\Program Files (x86)\WinMerge\MergePlugins\WatchBeginningOfLog.dll]
WatchEndOfLog.dll [C:\Program Files (x86)\WinMerge\MergePlugins\WatchEndOfLog.dll]
IgnoreColumns.dll [C:\Program Files (x86)\WinMerge\MergePlugins\IgnoreColumns.dll]
IgnoreCommentsC.dll [C:\Program Files (x86)\WinMerge\MergePlugins\IgnoreCommentsC.dll]
IgnoreFieldsComma.dll [C:\Program Files (x86)\WinMerge\MergePlugins\IgnoreFieldsComma.dll]
IgnoreFieldsTab.dll [C:\Program Files (x86)\WinMerge\MergePlugins\IgnoreFieldsTab.dll]
IgnoreLeadingLineNumbers.dll [C:\Program Files (x86)\WinMerge\MergePlugins\IgnoreLeadingLineNumbers.dll]
Editor scripts:
editor addin.sct [C:\Program Files (x86)\WinMerge\MergePlugins\editor addin.sct]
insert datetime.sct [C:\Program Files (x86)\WinMerge\MergePlugins\insert datetime.sct]

Archive support:
Enable: 1
7-Zip software installed on your computer: 0.00
7-Zip components for standalone operation: 0.00
Merge7z plugins on path:

1 Attachments


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks