#374 libgit2 considers UTF-8 (exercised on non-ASCII) as a sign of binary content, pagure will not render it
Closed: Fixed Opened by jpokorny.

References:

  • https://pagure.io/clufter/blob/70dac064a5fb1b026e9170cccddb9ea75cf507d3/f/main.py
  • https://github.com/libgit2/libgit2/issues/880 (not sure which commit made it closed)

Could pagure be made a bit more clever?


I've already been trying to improve things as pygit2 0.22.0 has a different behavior has 0.21.4 but apparently there is still more work.

If you have ideas, I'll welcome them :)

Note this is the custom method that is used in addition to libgit2's is_binary to try to figure out if a file is a binary or not:

https://pagure.io/pagure/blob/master/f/pagure/lib/init.py#_2406

I tried reproducing this issue locally but couldn't.

I think it got fixed by: https://pagure.io/pagure/pull-request/452

That would be great, looking forward to new version :)

Found out new version has already been rolled out as the content is displayed now.
However not entirely correctly: #494.

Metadata