* 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:59 +00:00
parent b2f5513132
commit 7c5f6b7c4b

View File

@ -544,11 +544,17 @@ class translation
case 'gb18030': case 'gb18030':
$from = 'EUC-CN'; $from = 'EUC-CN';
break; break;
case 'windows-1252':
if (function_exists('iconv'))
{
$prefer_iconv = true;
break;
}
// fall throught to remap to iso-8859-1
case 'us-ascii': case 'us-ascii':
case 'macroman': case 'macroman':
case 'iso8859-1': case 'iso8859-1':
case 'windows-1258': case 'windows-1258':
case 'windows-1252':
$from = 'iso-8859-1'; $from = 'iso-8859-1';
break; break;
case 'windows-1250': case 'windows-1250':
@ -559,6 +565,7 @@ class translation
break; break;
case 'windows-874': case 'windows-874':
case 'tis-620': case 'tis-620':
case 'windows-1256':
$prefer_iconv = true; $prefer_iconv = true;
break; break;
} }