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))