liuwons / liuwons/wxBot

联系人昵称中有emoji时报错

Open
#118 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

[MSG] Roger,Standby。:
[ERROR] Except in proc_msg
Traceback (most recent call last):
File "E:\wxbot\wxbot.py", line 618, in proc_msg
self.handle_msg(r)
File "E:\wxbot\wxbot.py", line 588, in handle_msg
content = self.extract_msg_content(msg_type_id, msg)
File "E:\wxbot\wxbot.py", line 436, in extract_msg_content
print ' %s[Text](illegal text).' % msg_prefix
UnicodeEncodeError: 'gbk' codec can't encode character u'\ud83d' in position 4: illegal multibyte sequence

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in wxbot.py at extract_msg_content around line 436 and reproduce the failure with a contact nickname containing emoji. Check how the text is printed under the GBK console encoding, then verify that processing the message no longer raises UnicodeEncodeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
internationalization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.