Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #0009034: CSV Export with special chars dont work properly #30

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions config_defaults_inc.php
Expand Up @@ -2953,6 +2953,14 @@
*/
$g_csv_separator = ',';

/**
* CSV Export
* Add Byte Order Mark (BOM) at the begining of the file, some tools need it (Excel)
* @global string $g_csv_add_bom
*/
$g_csv_add_bom = OFF;


/**
* The threshold required for users to be able to manage configuration of a project.
* This includes workflow, email notifications, columns to view, and others.
Expand Down
5 changes: 5 additions & 0 deletions csv_export.php
Expand Up @@ -78,6 +78,11 @@
# Get columns to be exported
$t_columns = csv_get_columns();

# export BOM
if ( config_get( 'csv_add_bom' ) == ON ) {
echo "\xEF\xBB\xBF";
}

# export the titles
$t_first_column = true;
ob_start();
Expand Down