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

Always use UTF-8 encoding when parsing TSV file document corpora #325

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

osma
Copy link
Member

@osma osma commented Sep 2, 2019

This is a follow-up for PR #263 which added explicit encoding="utf-8" parameters to many open calls but missed one case: when reading document corpora from TSV files (optionally gzip compressed). This PR fixes the one remaining case while also simplifying the code slightly.

The problem was reported by Pekka K. / Yle Arkisto. It manifests mostly on Windows, where non-UTF-8 locales (e.g. cp1252) are commonly used.

@osma osma added the bug label Sep 2, 2019
@osma osma added this to the 0.42 milestone Sep 2, 2019
@osma osma merged commit 86a8cec into master Sep 2, 2019
@codecov
Copy link

codecov bot commented Sep 2, 2019

Codecov Report

Merging #325 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
- Coverage   99.49%   99.49%   -0.01%     
==========================================
  Files          56       56              
  Lines        2945     2944       -1     
==========================================
- Hits         2930     2929       -1     
  Misses         15       15
Impacted Files Coverage Δ
annif/corpus/document.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 129974c...099c4aa. Read the comment docs.

@osma osma deleted the document-corpus-utf-8-encoding branch September 30, 2019 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant