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

add explicit encoding mode to file_converter/txt.py #478

Merged
merged 2 commits into from Oct 12, 2020

Conversation

Zenahr
Copy link
Contributor

@Zenahr Zenahr commented Oct 11, 2020

Related to #477, #223.

This would just be a quick fix. The default encoding mode is set to utf-8. Users would still have to change the source code in order to switch to other encoding modes.

Copy link
Member

@tholor tholor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Zenahr ,
Thanks for adding this! Encoding issues are always nasty. How about we add a parameter encoding to the __init__ so that users can pass the required encoding if needed? We could still put utf-8 as the default there.

@Zenahr
Copy link
Contributor Author

Zenahr commented Oct 12, 2020

@tholor sounds sensible to me. Would you mind adding it yourself? I can't access my development machine atm. Or I'll add it later myself.

@tholor
Copy link
Member

tholor commented Oct 12, 2020

Sure, I'll add it :)

@tholor
Copy link
Member

tholor commented Oct 12, 2020

After a second thought, I decided to add the param rather to the convert() method, as the encoding might change for different files. Therefore, a class attribute seemed too static.

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

Successfully merging this pull request may close these issues.

None yet

2 participants