A programming framework for agentic AI
Specify that text files are utf-8 in mdconvert (#412)
afourneya8343c724413
diff --git a/python/teams/team-one/src/team_one/markdown_browser/mdconvert.py b/python/teams/team-one/src/team_one/markdown_browser/mdconvert.pyindex 198ee6233..4198e8e0e 100644--- a/python/teams/team-one/src/team_one/markdown_browser/mdconvert.py+++ b/python/teams/team-one/src/team_one/markdown_browser/mdconvert.py@@ -160,7 +160,7 @@ class PlainTextConverter(DocumentConverter):return Nonetext_content = ""- with open(local_path, "rt") as fh:+ with open(local_path, "rt", encoding="utf-8") as fh:text_content = fh.read()return DocumentConverterResult(title=None,@@ -178,7 +178,7 @@ class HtmlConverter(DocumentConverter):return Noneresult = None- with open(local_path, "rt") as fh:+ with open(local_path, "rt", encoding="utf-8") as fh:result = self._convert(fh.read())return result@@ -222,7 +222,7 @@ class WikipediaConverter(DocumentConverter):# Parse the filesoup = None- with open(local_path, "rt") as fh:+ with open(local_path, "rt", encoding="utf-8") as fh:soup = BeautifulSoup(fh.read(), "html.parser")# Remove javascript and style blocks@@ -267,7 +267,7 @@ class YouTubeConverter(DocumentConverter):# Parse the filesoup = None- with open(local_path, "rt") as fh:+ with open(local_path, "rt", encoding="utf-8") as fh:soup = BeautifulSoup(fh.read(), "html.parser")# Read the meta tags@@ -396,7 +396,7 @@ class BingSerpConverter(DocumentConverter):# Parse the filesoup = None- with open(local_path, "rt") as fh:+ with open(local_path, "rt", encoding="utf-8") as fh:soup = BeautifulSoup(fh.read(), "html.parser")# Clean up some formatting