summaryrefslogtreecommitdiffstats
path: root/system/helpers/download_helper.php
diff options
context:
space:
mode:
authorytetsuro <phper.0o0@gmail.com>2018-02-01 03:50:36 +0100
committerytetsuro <phper.0o0@gmail.com>2018-02-05 16:12:28 +0100
commitc755a6b0b32b58c86989e5c6cfd8085732b1e497 (patch)
treeb76b9a5ec7ec8f40db69a47a655a2701934c662e /system/helpers/download_helper.php
parenta3e36019c787eb87fd0bc2e5ba9948c85c4a2c44 (diff)
refactor use Utf8 class
Diffstat (limited to 'system/helpers/download_helper.php')
-rw-r--r--system/helpers/download_helper.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index 93d468421..a169c3fd5 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -151,13 +151,10 @@ if ( ! function_exists('force_download'))
$encoding = config_item('charset');
if (strtoupper($encoding) !== 'UTF-8')
{
- if (MB_ENABLED)
+ $CI =& get_instance();
+ if ($converted_filename = $CI->utf8->convert_to_utf8($utf8_filename, $encoding) )
{
- $utf8_filename = mb_convert_encoding($utf8_filename, 'UTF-8', $encoding);
- }
- elseif (ICONV_ENABLED)
- {
- $utf8_filename = @iconv($encoding, 'UTF-8', $utf8_filename);
+ $utf8_filename = $converted_filename;
}
}