Skip to content

Commit 2744122

Browse files
committed
Use mb_convert_encoding instead of utf8_decode
1 parent 60e8e42 commit 2744122

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/BinaryFileResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testSetContentDispositionGeneratesSafeFallbackFilenameForWrongly
7171
{
7272
$response = new BinaryFileResponse(__FILE__);
7373

74-
$iso88591EncodedFilename = utf8_decode('föö.html');
74+
$iso88591EncodedFilename = mb_convert_encoding('föö.html', 'ISO-8859-1', 'UTF-8');
7575
$response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $iso88591EncodedFilename);
7676

7777
// the parameter filename* is invalid in this case (rawurldecode('f%F6%F6') does not provide a UTF-8 string but an ISO-8859-1 encoded one)

0 commit comments

Comments
 (0)