Add an encoding parameter to io.load_tabby #116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "mslw/encoding2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR resolves #112 by adding an optional
encodingparameter toio.load_tabby. The parameter can be used to specify encoding for reading tsv files.When not specified (
encoding=None), we keep the default behavior (implicitly usinglocale.getencoding()1,2).With external libraries it might be possible to guess a file encoding that produces a correct result based on the files content, but the success is not guaranteed when there are few non-ascii characters in the entire file (think: list of authors). I made an attempt with #114 but didn't like it in the end. Here, we do not attempt to guess, instead expecting the user to know the encoding they need to use.
This PR also fixes an unrelated documentation typo to satisfy the codespell checks.
https://docs.python.org/3/library/pathlib.html#pathlib.Path.open ↩︎
https://docs.python.org/3/library/functions.html#open ↩︎
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.