From dc17cfbb4786f644a325e7c56a55074cdc703de4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 4 Jun 2012 11:58:08 +0000 Subject: [PATCH] * API: support windows-1256 via iconv and prefer iconv for windows-1252 too --- phpgwapi/inc/class.translation.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.translation.inc.php b/phpgwapi/inc/class.translation.inc.php index 7697263443..92dbd5ac83 100644 --- a/phpgwapi/inc/class.translation.inc.php +++ b/phpgwapi/inc/class.translation.inc.php @@ -548,11 +548,17 @@ class translation case 'gb18030': $from = 'EUC-CN'; break; + case 'windows-1252': + if (function_exists('iconv')) + { + $prefer_iconv = true; + break; + } + // fall throught to remap to iso-8859-1 case 'us-ascii': case 'macroman': case 'iso8859-1': case 'windows-1258': - case 'windows-1252': $from = 'iso-8859-1'; break; case 'windows-1250': @@ -563,6 +569,7 @@ class translation break; case 'windows-874': case 'tis-620': + case 'windows-1256': $prefer_iconv = true; break; }