Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobocoder <anthon.pang@gmail.com>2011-03-21 23:01:41 +0300
committerrobocoder <anthon.pang@gmail.com>2011-03-21 23:01:41 +0300
commitddd2d2304f326c502d67f7a8f5a7f30c404459c3 (patch)
tree81cced6626176a6a08ad916fb2aeb6517a9205cf /libs/upgradephp
parenta4fa066e3efb32e4a846a6b32fe3aa3b99d3e940 (diff)
fixes #2215
git-svn-id: http://dev.piwik.org/svn/trunk@4163 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/upgradephp')
-rw-r--r--libs/upgradephp/upgrade.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/libs/upgradephp/upgrade.php b/libs/upgradephp/upgrade.php
index a3274a541e..919f64f317 100644
--- a/libs/upgradephp/upgrade.php
+++ b/libs/upgradephp/upgrade.php
@@ -979,3 +979,33 @@ function _readfile($filename, $useIncludePath = false, $context = null)
}
return false;
}
+
+/**
+ * utf8_encode replacement
+ *
+ * @param string $data
+ * @return string
+ */
+if (!function_exists('utf8_encode')) {
+ function utf8_encode($data) {
+ if (function_exists('iconv')) {
+ return @iconv('ISO-8859-1', 'UTF-8', $data);
+ }
+ return $data;
+ }
+}
+
+/**
+ * utf8_decode replacement
+ *
+ * @param string $data
+ * @return string
+ */
+if (!function_exists('utf8_decode')) {
+ function utf8_decode($data) {
+ if (function_exists('iconv')) {
+ return @iconv('UTF-8', 'ISO-8859-1', $data);
+ }
+ return $data;
+ }
+}