Skip to content

Commit

Permalink
Explicit encoding argument in read_text()
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Jun 7, 2024
1 parent 353be33 commit 43002ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ITables ChangeLog
------------------

**Fixed**
- We have added an explicit `encoding` argument in the calls to `read_text` to address an issue seen on Windows ([#252](https://github.com/mwouts/itables/issues/252)).
- We have adjusted the codecov settings ([#280](https://github.com/mwouts/itables/pull/280))


Expand Down
4 changes: 2 additions & 2 deletions src/itables/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ def get_animated_logo(display_logo_when_loading):

def generate_init_offline_itables_html(dt_bundle: Path):
assert dt_bundle.suffix == ".js"
dt_src = dt_bundle.read_text()
dt_css = dt_bundle.with_suffix(".css").read_text()
dt_src = dt_bundle.read_text(encoding="utf-8")
dt_css = dt_bundle.with_suffix(".css").read_text(encoding="utf-8")
dt64 = b64encode(dt_src.encode("utf-8")).decode("ascii")

id = "itables_init_notebook_mode_" + str(uuid.uuid4()).replace("-", "_")
Expand Down
2 changes: 1 addition & 1 deletion src/itables/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""ITables' version number"""

__version__ = "2.1.0"
__version__ = "2.1.1-dev"

0 comments on commit 43002ce

Please sign in to comment.