Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

消息乱码怎么处理? #7

Open
LaLaLaLou opened this issue Apr 8, 2024 · 4 comments
Open

消息乱码怎么处理? #7

LaLaLaLou opened this issue Apr 8, 2024 · 4 comments

Comments

@LaLaLaLou
Copy link

curl http://127.0.0.1:3000/0?alias=xxx'&'content=哈喽a
调用上面这个语句发送消息“哈喽”是乱码

@LaLaLaLou
Copy link
Author

要是能支持表情和图片就完美了

@raintoway
Copy link

毕竟终端没法展示表情和图片

@zjsycwmrbig
Copy link

乱码有兄弟解决了吗

@lhy1010
Copy link

lhy1010 commented Apr 22, 2024

curl http://127.0.0.1:3000/0?alias=xxx'&'content=哈喽a 调用上面这个语句发送消息“哈喽”是乱码
index.ts /0 和 /1 两个接口不需要对内容进行转码 改掉就可以

// const content = string2utf8(req.query.content?.toString())
// const name = string2utf8(req.query.name?.toString())
// const alias = string2utf8(req.query.alias?.toString())
const content = req.query.content?.toString()
const name = req.query.name?.toString()
const alias = req.query.alias?.toString()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants