GitFiend / Support

Public repo for GitFiend questions and issues
118 stars 7 forks source link

Can't display certain file types #180

Open NordicAngel opened 1 year ago

NordicAngel commented 1 year ago

GitFiend won't display the diffs for some types of files when in the changes tab or during merge, but will after they have been committed or stashed. I know .ext files doesn't work even though I can read them in Notepad as plain text. Is there anything I can do on my end?

NordicAngel commented 1 year ago

After messing with this for a bit I found that some times the files show and after using git diff to find out why some work, I found that the one that doesn't work, don't have CR but the ones that work do. So the problem might be that it's trying to diff files with different or mixed line endings.

NordicAngel commented 1 year ago

Update apparently the thing that breaks it is not EOL but special characters like "æÆøØåÅ" is there some way of helping that on my end?

GitFiend commented 1 year ago

Thanks for investigating. I can try a file with all the special characters I can find and see if I can reproduce it. If I can reproduce the issue, I'll have a fix in the next version.

GitFiend commented 1 year ago

I've been trying some unicode testing pages and haven't been able to replicate the issue. If could get a minimal repo or a file that shows the issue, that would be great.

NordicAngel commented 1 year ago

I have been able to recreate the problem in a repo here. Apparently the problem is special characters in ansi encoding.

GitFiend commented 1 year ago

Thanks for the repo, that helped a lot. It looks like strings in Rust are guaranteed utf8, so that file can't be read into a standard string for diffing. It looks like the best solution is to switch to a different kind of string, but that will involve quite a lot of changes. I'll probably start this soon.