为什么解码无法在Node.js上正常工作?

时间:2019-12-25 23:33:47

标签: node.js decode

为什么我可以在网络JavaScript上decode %7B%22q%22:null,而不能在nodejs上做到这一点?

如果我在javascript网络上对此进行解码,则会得到以下结果:'{"q":null'   但是当我在节点上执行此操作时,我得到了这个¨"q":null

我该如何在nodejs上解码呢?

我的代码:

 console.log(decodeURIComponent(`%7B%22q%22:null`))

糟糕:我正在使用v12.13.0上的节点

enter image description here

谢谢

0 个答案:

没有答案