From 2aee071c4fea7e36ba058f25aacb8a533a3263d0 Mon Sep 17 00:00:00 2001 From: David Rodenkirchen Date: Sun, 26 May 2024 13:27:54 +0200 Subject: [PATCH] add encoding info for windows platform --- ezgg_website/components/news_post.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ezgg_website/components/news_post.py b/ezgg_website/components/news_post.py index 823f2b7..8f8147f 100644 --- a/ezgg_website/components/news_post.py +++ b/ezgg_website/components/news_post.py @@ -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: