petelin
V2EX  ›  问与答

釥떑 这个谁能用 iconv 或者其他 linux 命令解码出来?

  •  
  •   petelin · Sep 5, 2016 · 1770 views
    This topic created in 3564 days ago, the information mentioned may be changed or developed.

    如题, Python 下我搞出来了,但是 python 内部使用'unicode'标识的,我粘贴进去就得到了 unicode 的字符,然后直接转换成 utf16 的字节,去掉开头两个字节,然后在编码成 utf8 就行了,

    命令行不太一样,主要是我不知道 echo 出的东西是什么格式的?utf-8 吗?字节吗? 那

    echo '釥떑' | iconv -f utf-16

    怎么不行呢,求教

    2 replies    2016-09-06 03:19:45 +08:00
    Delbert
        1
    Delbert  
       Sep 5, 2016 via Android
    echo 出来的不是 LANG 的编码吗?
    SoloCompany
        2
    SoloCompany  
       Sep 6, 2016   ❤️ 1
    echo 釥떑 | iconv -t utf-16le

    呵呵
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5965 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 02:20 · PVG 10:20 · LAX 19:20 · JFK 22:20
    ♥ Do have faith in what you're doing.