tianxiacangshen
V2EX  ›  PHP

curl 抓取目标网页内容,结果西班牙字符显示为一团黑

  •  1
     
  •   tianxiacangshen · Jul 5, 2017 · 1896 views
    This topic created in 3323 days ago, the information mentioned may be changed or developed.
    对象网页是西班牙语,页面设置的编码是:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>

    模拟 get 能抓取到内容,但是西班牙字符比如 ñ ,显示为�,本地 iconv 转码函数无效,curl 指定 header 编码也无效
    sighforever
        1
    sighforever  
       Jul 5, 2017 via Android
    是不是缺少字体啊?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3545 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:36 · PVG 12:36 · LAX 21:36 · JFK 00:36
    ♥ Do have faith in what you're doing.