From a4a89ce33c5fe4ee311b4ee3cd5378aa18cd5949 Mon Sep 17 00:00:00 2001 From: Jacob Torrey Date: Thu, 9 May 2024 10:21:53 -0600 Subject: [PATCH] Add encoding to PRELUDE reading --- zippy/zippy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zippy/zippy.py b/zippy/zippy.py index 96f91ab..f038191 100755 --- a/zippy/zippy.py +++ b/zippy/zippy.py @@ -42,7 +42,7 @@ def clean_text(s : str) -> str: # The prelude file is a text file containing only AI-generated text, it is used to 'seed' the LZMA dictionary PRELUDE_FILE : str = 'ai-generated.txt' -PRELUDE_STR = clean_text(files('zippy').joinpath(PRELUDE_FILE).read_text()) +PRELUDE_STR = clean_text(files('zippy').joinpath(PRELUDE_FILE).read_text(encoding='utf-8')) class AIDetector(ABC): '''