From bef46261e0b1ba78f392ad49ac41e5a213f3df53 Mon Sep 17 00:00:00 2001 From: Deividas Date: Fri, 12 Oct 2018 22:53:28 +0300 Subject: [PATCH] Fix file not found browser error for UTF-8 filename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For example: export configuration with filename setting veiksmų_ataskaita.xlsx will save temporary file as veiksmu_ataskaita.xlsx --- src/ExportMenu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExportMenu.php b/src/ExportMenu.php index add172b..1bdc122 100644 --- a/src/ExportMenu.php +++ b/src/ExportMenu.php @@ -793,7 +793,7 @@ public function run() "Invalid permissions to write to '{$this->folder}' as set in `ExportMenu::folder` property." ); } - $file = self::slash($this->folder) . $this->filename . '.' . $config['extension']; + $file = self::slash($this->folder) . iconv("UTF-8", "ISO-8859-1//TRANSLIT", $this->filename) . '.' . $config['extension']; $writer->save($file); if ($this->stream) { $this->clearOutputBuffers();