Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patches views_data_export for csv issues
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/plugins/views_data_export_plugin_style_export.inc b/plugins/views_data_export_plugin_style_export.inc | ||
index 3e6227b..53974bc 100644 | ||
--- a/plugins/views_data_export_plugin_style_export.inc | ||
+++ b/plugins/views_data_export_plugin_style_export.inc | ||
@@ -235,6 +235,14 @@ class views_data_export_plugin_style_export extends views_plugin_style { | ||
$rows = array(); | ||
$title = ''; | ||
$output = ''; | ||
+ | ||
+ if ($this instanceof views_data_export_plugin_style_export_csv) { | ||
+ $encoding = $this->options['encoding']; | ||
+ if (empty($encoding) || ($encoding != 'ASCII')) { | ||
+ $output = chr(0xEF).chr(0xBB).chr(0xBF); | ||
+ } | ||
+ } | ||
+ | ||
$output .= theme($this->theme_functions($this->definition['additional themes base'] . '_header'), array('view' => $this->view, 'options' => $this->options, 'rows' => $rows, 'title' => $title)); | ||
return $output; | ||
} |