fix: force UTF-8 encoding for WeChat draft/get response
WeChat API returns Content-Type without charset, causing requests to default to ISO-8859-1. Chinese content was decoded as mojibake. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
73a67fffc7
commit
7f0aff1738
1 changed files with 1 additions and 0 deletions
|
|
@ -79,6 +79,7 @@ def get_draft(access_token: str, media_id: str) -> str:
|
|||
params={"access_token": access_token},
|
||||
json={"media_id": media_id},
|
||||
)
|
||||
resp.encoding = "utf-8"
|
||||
data = resp.json()
|
||||
|
||||
errcode = data.get("errcode", 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue