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):
|
if isinstance(article_text, str):
|
||||||
self._article_text = article_text
|
self._article_text = article_text
|
||||||
elif isinstance(article_text, Path):
|
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()
|
self._article_text = f.read()
|
||||||
|
|
||||||
def build(self) -> rio.Component:
|
def build(self) -> rio.Component:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user