Skip to content

Commit aabf956

Browse files
committed
Handle Unicode characters on systems where utf-8 is not default
1 parent dfef73e commit aabf956

File tree

1 file changed

+2
-1
lines changed
  • packages/python/plotly/plotly/io

1 file changed

+2
-1
lines changed

Diff for: packages/python/plotly/plotly/io/_html.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ def write_html(
533533

534534
# Write HTML string
535535
if path is not None:
536-
path.write_text(html_str)
536+
# To use a different file encoding, pass a file descriptor
537+
path.write_text(html_str, "utf-8")
537538
else:
538539
file.write(html_str)
539540

0 commit comments

Comments
 (0)