mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
#991 CSV export truncated (system dependent, since 2.0) due to a bug in iconv, the workaround is to do little by little -retrofit from trunk
SVN:2.0.3[3353]
This commit is contained in:
@@ -180,15 +180,15 @@ try
|
||||
if ($sFileName != null)
|
||||
{
|
||||
$oP = new CSVPage("iTop - Export");
|
||||
$sCSVData = cmdbAbstractObject::GetSetAsCSV($oErrorObjectSet, array('localize_values' => true, 'fields_advanced' => $bAdvanced));
|
||||
$sCharset = MetaModel::GetConfig()->Get('csv_file_default_charset');
|
||||
$sCSVData = cmdbAbstractObject::GetSetAsCSV($oErrorObjectSet, array('localize_values' => true, 'fields_advanced' => $bAdvanced), $sCharset);
|
||||
if ($sCharset == 'UTF-8')
|
||||
{
|
||||
$sOutputData = UTF8_BOM.iconv('UTF-8', 'UTF-8//IGNORE//TRANSLIT', $sCSVData);
|
||||
$sOutputData = UTF8_BOM.$sCSVData;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sOutputData = iconv('UTF-8', $sCharset.'//IGNORE//TRANSLIT', $sCSVData);
|
||||
$sOutputData = $sCSVData;
|
||||
}
|
||||
if ($sFileName == '')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user