casperjs 在windows下中文乱码
c:Tempcasperjs-phantomjs>casperjs test0.backup.js 22222@22 22222
[info] [phantom] Starting...
[info] [phantom] Running suite: 3 steps
[debug] [phantom] opening url: https://mp.weixin.qq.com/, HTTP GET
[debug] [phantom] Navigation requested: url=https://mp.weixin.qq.com/, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "https://mp.weixin.qq.com/"
[debug] [phantom] Automatically injected ./jquery-1.11.1.min.js client side
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step _step 2/3 https://mp.weixin.qq.com/ (HTTP 200)
[info] [phantom] Step _step 2/3: done in 33102ms.
[info] [phantom] Step anonymous 3/3 https://mp.weixin.qq.com/ (HTTP 200)
Page url is https://mp.weixin.qq.com/
Page title is 微信公众平台
[info] [phantom] Step anonymous 3/3: done in 33137ms.
[info] [phantom] Done 3 steps in 33169ms
[info] [phantom] Starting...
[info] [phantom] Running suite: 3 steps
[debug] [phantom] opening url: https://mp.weixin.qq.com/, HTTP GET
[debug] [phantom] Navigation requested: url=https://mp.weixin.qq.com/, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "https://mp.weixin.qq.com/"
[debug] [phantom] Automatically injected ./jquery-1.11.1.min.js client side
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step _step 2/3 https://mp.weixin.qq.com/ (HTTP 200)
[info] [phantom] Step _step 2/3: done in 33102ms.
[info] [phantom] Step anonymous 3/3 https://mp.weixin.qq.com/ (HTTP 200)
Page url is https://mp.weixin.qq.com/
Page title is 微信公众平台
[info] [phantom] Step anonymous 3/3: done in 33137ms.
[info] [phantom] Done 3 steps in 33169ms
@红薯
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
@红薯
chcp已经是936,第二种方法不知道怎么弄。。。
哈 ,行啦, chcp 65001 这样就是改为了UTF8了
1、试试chcp,设为936.
2、shell不是浏览器不能识别编码,GBK和UTF-8不可能全兼容,智能一点根据http header中的charset来做转换。