picasso250
V2EX  ›  Node.js

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

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

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