From 1b83d0e96f8f27d7d5d1773f0aa4f06b9a8061a8 Mon Sep 17 00:00:00 2001 From: Nandaka Date: Sat, 23 Jul 2022 09:48:37 +0800 Subject: [PATCH] update #1137 --- PixivDownloadHandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PixivDownloadHandler.py b/PixivDownloadHandler.py index 5a2599e6..10a58f70 100644 --- a/PixivDownloadHandler.py +++ b/PixivDownloadHandler.py @@ -245,7 +245,7 @@ def download_image(caller, raise else: PixivHelper.print_and_log('info', ' done.') - + # codecs.open is stateless, so if platform_encoding == utf-8-sig each new line starts from utf-8-sig # this is bad and I feel bad @@ -256,7 +256,7 @@ def download_image(caller, # write to downloaded lists if caller.start_iv or config.createDownloadLists: - dfile = codecs.open(caller.dfilename, 'a+', encoding=caller.platform_encoding) + dfile = codecs.open(caller.dfilename, 'a+', encoding=dfile_encoding) dfile.write(filename_save + "\n") dfile.close()