text-encoding正确使用姿势

蓝牙打印,需要转字符串为gb2312到uint8array.果断使用了一把text-encoding,始终不对。

https://github.com/inexorabletash/text-encoding

搞了2-3个小时,为毛不能进入函数调用里面,文档里面说是polliy.js,要提前把TextEncoder干掉,突然想起来了chrome可能有TextEncoder对象。果断提前干掉它。一切都正常了。特此记录。

posted @ 2018-06-22 15:20  forhells  阅读(1699)  评论(0编辑  收藏  举报