You are here

function webform_exporter_delimited::bof in Webform 6.3

Same name and namespace in other branches
  1. 5.2 webform_export.inc \webform_exporter_delimited::bof()
  2. 6.2 webform_export.inc \webform_exporter_delimited::bof()
  3. 7.3 includes/webform.export.inc \webform_exporter_delimited::bof()

Overrides webform_exporter::bof

File

includes/webform.export.inc, line 107
Provides several different handlers for exporting webform results.

Class

webform_exporter_delimited

Code

function bof(&$file_handle) {
  $output = '';

  // Include at BOM at the beginning of the file for Little Endian.
  // This makes tab-separated imports work correctly in MS Excel.
  if (function_exists('mb_convert_encoding') && $this->delimiter == "\t") {
    $output = chr(255) . chr(254);
  }
  @fwrite($file_handle, $output);
}