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

Explicit encoding argument in read_text() #253

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading