V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
mortence
V2EX  ›  PHP

PHP 解压 zip 包, zip 包内文件名为汉字时,文件名无法正常获取

  •  
  •   mortence · Dec 14, 2017 · 2654 views
    This topic created in 3068 days ago, the information mentioned may be changed or developed.

    使用 WinRAR 打包的 zip 包使用 ZipArchive 可正常解析。使用 360 压缩打包的文件中,如果压缩包内含有中文文件名,中文文件名无法正常获取。使用 iconv 对文件名转换编码后,文件名依然无法正常显示。我猜想,是不是 PHP 在读取压缩包内文件时,已经使用了默认编码?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   918 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:04 · PVG 05:04 · LAX 14:04 · JFK 17:04
    ♥ Do have faith in what you're doing.