mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Do charset conversion once per line instead of on each field
This commit is contained in:
parent
5d77dbfdc9
commit
288d40065a
@ -182,9 +182,6 @@ class importexport_export_csv implements importexport_iface_export_record
|
||||
}
|
||||
}
|
||||
|
||||
// do charset translation
|
||||
$this->record = $this->translation->convert( $this->record, $this->translation->charset(), $this->csv_charset );
|
||||
|
||||
$this->fputcsv( $this->handle, $this->record, $this->csv_options['delimiter'], $this->csv_options['enclosure'] );
|
||||
$this->num_of_records++;
|
||||
}
|
||||
@ -269,7 +266,7 @@ class importexport_export_csv implements importexport_iface_export_record
|
||||
// Not quite a recursive merge, since only one level
|
||||
foreach($fields as $type => &$list) {
|
||||
if($c_fields[$type]) {
|
||||
$list = array_merge($c_fields[$type], $list);;
|
||||
$list = array_merge($c_fields[$type], $list);
|
||||
unset($c_fields[$type]);
|
||||
}
|
||||
}
|
||||
@ -377,6 +374,9 @@ class importexport_export_csv implements importexport_iface_export_record
|
||||
}
|
||||
$string .= "\n";
|
||||
|
||||
// do charset translation
|
||||
$string = $this->translation->convert( $string, $this->translation->charset(), $this->csv_charset );
|
||||
|
||||
fwrite($filePointer, $string);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user