Bug #78520 [Com]: php download file name ≈ä½  好;123.zip

From: Date: Tue, 10 Sep 2019 03:26:24 +0000
Subject: Bug #78520 [Com]: php download file name ≈ä½  好;123.zip
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222673@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78520&edit=1 ID: 78520 Comment by: 77738609 at qq dot com Reported by: 77738609 at qq dot com Summary: php download file name ≈ä½  好;123.zip Status: Open Type: Bug Package: *URL Functions PHP Version: 7.4.0RC1 Block user comment: N Private report: N New Comment: Actual result:&ap Expected result: '≈ä½  好;123.zip'; Previous Comments: ------------------------------------------------------------------------ [2019-09-10 03:14:00] 77738609 at qq dot com Description: ------------ php download file name '≈ä½  好;123.zip'; file name is &ap c# can download Test script: --------------- php download file name '≈ä½  好;123.zip'; $filename = iconv('utf-8',"gbk//IGNORE",$filename); $filepath = 'D:/www/'.$filename; $file=fopen($filepath,"r"); header("Content-type:text/html;charset=utf-8"); header("Content-Type: application/octet-stream"); header("Accept-Ranges: bytes"); header("Accept-Length: ".filesize($filepath)); header("Content-Disposition: attachment; filename= $filename ; filename*=utf-8''$filename "); echo fread($file,filesize($filepath)); fclose($file); Expected result: ---------------- php download file name '≈ä½  好;123.zip'; Actual result: -------------- php download file name '≈ä½  好;123.zip'; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78520&edit=1

« previous php.bugs (#222673) next »