tianxiacangshen
V2EX  ›  PHP

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

  •  1
     
  •   tianxiacangshen · Jul 5, 2017 · 1934 views
    This topic created in 3356 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   ·   Privacy   ·   Solana   ·   937 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:39 · PVG 06:39 · LAX 15:39 · JFK 18:39
    ♥ Do have faith in what you're doing.