Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

When the caption has Chinese (Japanese, Korean) utf-8 characters, sending the file then the caption will be garbled or give an error. #46

Closed
siknet opened this issue Aug 8, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@siknet
Copy link

siknet commented Aug 8, 2023

OS & Platform
WIN11 21H2 AMD 3900XT / 32G RAM /RTX 3070

Version
1.1.4

Command
python tg-upload.py --proxy proxy -p 862520 --api_id xxx --api_hash xxx --phone 8632520 -l g:\av --capjson caption1 -c saohuo456 --as_video -d

Using Proxy?
True

Telegram Profile Type:
User

Describe the Bug:
When the caption has Chinese (Japanese, Korean) utf-8 characters, sending the file will be garbled or give an error.

⛔Note:
The temporary solution is:
modify the code at line 656.
with open("caption.json", "r") as caption_json:
Modify it to
with open("caption.json", "r", encoding='utf-8') as caption_json:

@siknet siknet added the bug Something isn't working label Aug 8, 2023
@siknet siknet changed the title When the caption has Chinese (Japanese, Korean) utf-8 characters, sending the file will be garbled or give an error. When the caption has Chinese (Japanese, Korean) utf-8 characters, sending the file then the caption will be garbled or give an error. Aug 8, 2023
@TheCaduceus
Copy link
Owner

Thanks for report! I will update it shortly. 👍

TheCaduceus added a commit that referenced this issue Aug 8, 2023
TheCaduceus added a commit that referenced this issue Aug 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants