mirror of
https://github.com/maunium/stickerpicker
synced 2024-12-29 07:08:15 +00:00
Set encoding to utf-8 when saving json file for stickerpack
Fixes UnicodeEncodeError with Windows 10 when trying to import sticker packs caused by the default encoding scheme in Windows
This commit is contained in:
parent
ba0096275c
commit
b884a9c387
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ async def reupload_pack(client: TelegramClient, pack: StickerSetFull, output_dir
|
|||
doc["body"] = sticker.emoticon
|
||||
doc["net.maunium.telegram.sticker"]["emoticons"].append(sticker.emoticon)
|
||||
|
||||
with open(pack_path, "w") as pack_file:
|
||||
with open(pack_path, "w", encoding="utf-8") as pack_file:
|
||||
json.dump({
|
||||
"title": pack.set.title,
|
||||
"id": f"tg-{pack.set.id}",
|
||||
|
|
Loading…
Reference in a new issue