lz-string压缩后字符串使用encodeURIComponent编码报错

http://pieroxy.net/blog/pages/lz-string/index.html

这是一个string压缩的工具

在用这个工具压缩后使用encodeURIComponent编码报错

Uncaught URIError: URI malformed

压缩用compressToUTF16这个方法会压缩成另一种可用的编码

posted @ 2017-03-03 18:05  张琼  阅读(1479)  评论(0编辑  收藏  举报