summaryrefslogtreecommitdiffstats
path: root/lib/kolab_client_task.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-07-31 09:31:30 +0200
committerAleksander Machniak <alec@alec.pl>2015-07-31 09:31:30 +0200
commitf59ecb4f8acaee229fd668147aa396c88196a47a (patch)
tree8828955e05bdeba66497d2f1602efc2b8d44f781 /lib/kolab_client_task.php
parent71982ccef591529c61e257acad1578deea7436e9 (diff)
downloadwebadmin-f59ecb4f8acaee229fd668147aa396c88196a47a.tar.gz
Workaround PHP bug with turkish locales (#5082)
Diffstat (limited to 'lib/kolab_client_task.php')
-rw-r--r--lib/kolab_client_task.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 4425303..43e5fea 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -102,7 +102,12 @@ class kolab_client_task
@include INSTALL_PATH . "/locale/$language.php";
}
- setlocale(LC_ALL, $language . '.utf8', 'en_US.utf8');
+ setlocale(LC_ALL, $language . '.utf8', $language . 'UTF-8', 'en_US.utf8', 'en_US.UTF-8');
+
+ // workaround for http://bugs.php.net/bug.php?id=18556
+ if (PHP_VERSION_ID < 50500 && in_array($language, array('tr_TR', 'ku', 'az_AZ'))) {
+ setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8');
+ }
self::$translation = $LANG;
}