add encoding info for windows platform
This commit is contained in:
parent
099f35fc87
commit
2aee071c4f
@ -15,7 +15,7 @@ class NewsPost(rio.Component):
|
||||
if isinstance(article_text, str):
|
||||
self._article_text = article_text
|
||||
elif isinstance(article_text, Path):
|
||||
with open(article_text, "r") as f:
|
||||
with open(article_text, "r", encoding="utf-8") as f:
|
||||
self._article_text = f.read()
|
||||
|
||||
def build(self) -> rio.Component:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user