picasso250
V2EX  ›  Node.js

提问:iconv 和 iconv-lite 都不能正确解码,一定是我姿势不对。

  •  
  •   picasso250 · Feb 9, 2014 · 8093 views
    This topic created in 4658 days ago, the information mentioned may be changed or developed.
    4 replies  •  1970-01-01 08:00:00 +08:00
    turing
    turing
    Feb 9, 2014❤️1
    1
    https://npmjs.org/package/gbk

    我写了一个包装,以防自己忘记怎么 encode 和 decode GBK 编码的网页。你可能用的着。
    YuHong
    YuHong
    Feb 9, 2014 via iPhone❤️1
    2
    request 默认编码是utf8
    request({
    encoding: null,
    uri:uri
    }, callback)
    sxd
    sxd
    Feb 10, 2014
    3
    encoding: null 必须的
    picasso250
    picasso250
    OP
    Feb 10, 2014
    4
    @YuHong 谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1075 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 23:06 · PVG 07:06 · LAX 15:06 · JFK 18:06
    ♥ Do have faith in what you're doing.