* API: support windows-1256 via iconv and prefer iconv for windows-1252 too

This commit is contained in:
Ralf Becker 2012-06-04 11:58:08 +00:00
parent 6fcc4455e4
commit dc17cfbb47

View File

@ -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;
}