inveniosoftware / invenio-previewer

Invenio module for previewing files.
https://invenio-previewer.readthedocs.io
MIT License
5 stars 60 forks source link

encoding: override ASCII to default encoding #179

Closed tmorrell closed 1 year ago

tmorrell commented 1 year ago

:heart: Thank you for your contribution!

Description

This PR resolves an issue with the text file previewer, where the encoding is detected as ASCII even though the file (and default) has utf8 characters beyond the detection range. Resolves https://github.com/inveniosoftware/invenio-previewer/issues/176 and partially resolves https://github.com/inveniosoftware/invenio-app-rdm/issues/1864

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Third-party code

If you've added third-party code (copy/pasted or new dependencies), please reach out to an architect.

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.