ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## demo ``` const encoder = new TextEncoder() // default 'utf-8' or 'utf8' const view = encoder.encode('你好') // Uint8Array(6) [228, 189, 160, 229, 165, 189] let decoder = new TextDecoder(); const decoderStr =decoder.decode(new Uint8Array([228,189,160,229,165,189])) // 你好 ```