From 7bfe676d53e766deb8cf0f1738ac6d36664fcd2c Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 04 Sep 2015 04:10:37 -0400
Subject: [PATCH] Fix various issues with Turkish (and similar) locales (#1490519)
---
program/include/rcmail.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index be395be..7df25f9 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -174,8 +174,10 @@
// set localization
setlocale(LC_ALL, $lang . '.utf8', $lang . '.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($lang, array('tr_TR', 'ku', 'az_AZ'))) {
+ // Workaround for http://bugs.php.net/bug.php?id=18556
+ // Also strtoupper/strtolower and other methods are locale-aware
+ // for these locales it is problematic (#1490519)
+ if (in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) {
setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8');
}
}
--
Gitblit v1.9.1