作者CodingMan ()
看板Ajax
标题[问题] 使用 Websocket 连线 PTT 如何使用 utf-8
时间Mon Sep 3 11:15:57 2018
如标题
目前使用以下程式码对 PTT 连线
options = {}
options.origin = '
https://webptt.com/cn.aspx?n='
this.ws = new WebSocket('wss://ws.ptt.cc/bbsu/', options)
可是回传回来一堆乱码,
参考了前人的程式码发现是需要将 big5uao 转换回 utf-8
请问有办法像 ssh
[email protected] 类似的方法
让 PTT 自己回传 utf-8 字串吗?
先谢谢各位了
--
https://i.imgur.com/B1kIMgR.png
写你的 PTT 机器人
https://github.com/Truth0906/PTTLibrary
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 59.124.167.226
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Ajax/M.1535944563.A.440.html
1F:推 eight0: 这应该问 PTT,或是 PttChrome 的作者 09/03 13:15
2F:→ CodingMan: 好的 我看一下 感恩 09/03 13:44
3F:推 VdustR: 登入的时候帐号加 , 09/17 14:57