diff options
author | Kees van Kempen <git@keesvankempen.nl> | 2022-01-07 14:49:54 +0300 |
---|---|---|
committer | Kees van Kempen <git@keesvankempen.nl> | 2022-01-07 14:53:26 +0300 |
commit | 6b5dea9746255fee40cc43ad66c1adcef9041016 (patch) | |
tree | a2ae664f51eb9e746f728b3cbcb49d677e96c70b /lib | |
parent | 3e4ef0fd749ffc97d9ee104064b5bad52e013cdf (diff) |
Switch from iconv to mb_convert_encoding
Fixes #1966
Signed-off-by: Kees van Kempen <git@keesvankempen.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/WopiController.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index e3013197..15805f3f 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -455,7 +455,7 @@ class WopiController extends Controller { } $file = $file[0]; $suggested = $this->request->getHeader('X-WOPI-SuggestedTarget'); - $suggested = iconv('utf-7', 'utf-8', $suggested); + $suggested = mb_convert_encoding($suggested, 'utf-8', 'utf-7'); if ($suggested[0] === '.') { $path = dirname($file->getPath()) . '/New File' . $suggested; @@ -575,7 +575,7 @@ class WopiController extends Controller { $suggested = $this->request->getHeader('X-WOPI-RequestedName'); - $suggested = iconv('utf-7', 'utf-8', $suggested) . '.' . $file->getExtension(); + $suggested = mb_convert_encoding($suggested, 'utf-8', 'utf-7') . '.' . $file->getExtension(); if (strpos($suggested, '.') === 0) { $path = dirname($file->getPath()) . '/New File' . $suggested; @@ -610,7 +610,7 @@ class WopiController extends Controller { $file = $file[0]; $suggested = $this->request->getHeader('X-WOPI-SuggestedTarget'); - $suggested = iconv('utf-7', 'utf-8', $suggested); + $suggested = mb_convert_encoding($suggested, 'utf-8', 'utf-7'); if ($suggested[0] === '.') { $path = dirname($file->getPath()) . '/New File' . $suggested; |