Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't display certain file types #180

Open
NordicAngel opened this issue Sep 1, 2023 · 6 comments
Open

Can't display certain file types #180

NordicAngel opened this issue Sep 1, 2023 · 6 comments

Comments

@NordicAngel
Copy link

NordicAngel commented Sep 1, 2023

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
Copy link
Author

NordicAngel commented Sep 1, 2023

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
Copy link
Author

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
Copy link
Owner

GitFiend commented Sep 5, 2023

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
Copy link
Owner

GitFiend commented Sep 6, 2023

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
Copy link
Author

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

@GitFiend
Copy link
Owner

GitFiend commented Sep 7, 2023

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.

GitFiend added a commit to GitFiend/gitfiend-core that referenced this issue Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants