add encoding info for windows platform

This commit is contained in:
David Rodenkirchen 2024-05-26 13:27:54 +02:00
parent 099f35fc87
commit 2aee071c4f

View File

@ -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: