diffuse icon indicating copy to clipboard operation
diffuse copied to clipboard

Character encoding error handling

Open joyously opened this issue 5 years ago • 0 comments

I'm not sure of the internals of how Diffuse works, but there is something wrong with the flow when there is a character encoding problem. I was using Meld since I needed to compare all files in a folder and one of my files showed a message that there was a character encoding problem, and subsequently, no highlighting of differences. meld-problem

It didn't tell me where in the file though, so I opened that file in Diffuse. Unfortunately, Diffuse shows highlighting that indicates that everything is a mismatch, and no errors. diffuse-problem

Trying to use the arrows to find the next mismatch didn't work, so I went to the bottom of the file, which is where I found some extra characters. But still, no indication why the diff highlighting isn't correct. diffuse-end

Looking at that part of the file in Meld, the error message at least makes more sense. It looks like Meld substituted null bytes for display, and highlighted them red, where nothing else is highlighted. meld-end

I'm not sure what the best handling of this sort of error is, but I think the Meld way was a bit more informative. Having obvious matching text shown as a difference makes me question if Diffuse is doing it right in other scenarios.

joyously avatar Aug 22 '20 17:08 joyously