Coder Social home page Coder Social logo

消息乱码怎么处理? about moyu-chat HOT 4 OPEN

LaLaLaLou avatar LaLaLaLou commented on August 30, 2024
消息乱码怎么处理?

from moyu-chat.

Comments (4)

LaLaLaLou avatar LaLaLaLou commented on August 30, 2024

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

from moyu-chat.

raintoway avatar raintoway commented on August 30, 2024

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

from moyu-chat.

zjsycwmrbig avatar zjsycwmrbig commented on August 30, 2024

乱码有兄弟解决了吗

from moyu-chat.

lhy1010 avatar lhy1010 commented on August 30, 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()

from moyu-chat.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.