How to convert character encoding from CP932 to UTF-8 in nodejs javascript, using the nodejs-iconv module (or other solution)

后端 未结 3 925
天涯浪人
天涯浪人 2020-12-15 14:07

I\'m attempting to convert a string from CP932 (aka Windows-31J) to utf8 in javascript. Basically I\'m crawling a site that ignores the utf-8 request in the request header

3条回答
  •  伪装坚强ぢ
    2020-12-15 14:39

    https://github.com/bnoordhuis/node-iconv/issues/19

    I tried /Users/Me/node_modules/iconv/test.js node test.js. It return error.

    On Mac OS X Lion, this problem seems depend on gcc.

提交回复
热议问题