`

nodejs在win7下ajax提交中文的异常

阅读更多

在用express做一个小网站时,用了ajax来提交中文参数,但后台里直接就报出以下异常信息,百思不得其解,用了 ecodeURIComponent及decodeURIComponent也是一样的问题,各种方法都尝试了一次,在无奈之下,决定重新安装 express,结果,一样的异常:

Java代码  收藏代码
  1. error Error: write EIO  
  2. error     at errnoException (net.js:904:11)  
  3. error     at Object.afterWrite (net.js:720:19)  
  4. error If you need help, you may report this *entire* log,  
  5. error including the npm and node versions, at:  
  6. error     <http://github.com/npm/npm/issues>  
  7. error System Windows_NT 6.1.7601  
  8. error command "d:\\nodejs\\\\node.exe" "d:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express" "-gd"  
  9. error cwd d:\nodejs  
  10. error node -v v0.10.26  
  11. error npm -v 1.4.3  
  12. error syscall write  
  13. error code EIO  
  14. error errno EIO  



实在搞不懂,于是就去群里问,也没有人知道,百度,google等都用上了,搜到一个说要用管理员打开cmd,说是win7权限的问题,尝试之,不可解决问题,继续搜,还是没有找到答案,准备放弃前再努力了一把,结果看到http://stackoverflow.com/questions/17035399/why-this-error-happend-nodejs-error-write-eio这个里说的问题,

于是重新打开cmd,输入chcp 936。再重新安装则可,上网再搜一下,说是系统编码的问题,936就是gb2312.

郁闷,差不多整整浪费了一天,真郁闷!!!!

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics