-
Notifications
You must be signed in to change notification settings - Fork 37
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
fix: specify encoding when reading and writing amber fossils #198
Conversation
Codecov Report
@@ Coverage Diff @@
## master #198 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 868 868
=========================================
Hits 868 868 |
@@ -57,7 +57,7 @@ def read_file(cls, filepath: str) -> "SnapshotFossil": | |||
indent_len = len(cls._indent) | |||
snapshot_fossil = SnapshotFossil(location=filepath) | |||
try: | |||
with open(filepath, "r", newline="") as f: | |||
with open(filepath, "r", encoding="utf-8", newline="") as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR, https://docs.python.org/3/library/functions.html#open:
In text mode, if encoding is not specified the encoding used is platform dependent: locale.getpreferredencoding(False) is called to get the current locale encoding.
## [0.4.1](v0.4.0...v0.4.1) (2020-04-19) ### Bug Fixes * specify encoding when reading and writing amber fossils ([#198](#198)) ([a6a53c4](a6a53c4))
🎉 This PR is included in version 0.4.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Specifies what encoding to use when reading and writing snapshots to amber fossils
Related Issues
Checklist
Additional Comments