From c91c9cec9c4eefb1727a5ac436a35135ceac31d9 Mon Sep 17 00:00:00 2001 From: cloveranon Date: Wed, 18 Dec 2019 13:41:54 -0500 Subject: [PATCH] utf8 in pastebin fixed --- pastebin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pastebin.py b/pastebin.py index e7d6770..dab4b5d 100644 --- a/pastebin.py +++ b/pastebin.py @@ -33,5 +33,5 @@ for sect in sections[2:][:-1]: else: title=story[:30] title=filename(title)+'.txt' - with Path('prompts', category, title).open('w') as f: + with Path('prompts', category, title).open('w', encoding='UTF-8') as f: f.write(re.sub(r'^\([^\)]+\)\n', '', story))