Revision 07a38b9f
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
SL/Helper/Csv.pm | ||
---|---|---|
111 | 111 |
]) unless $header; |
112 | 112 |
} |
113 | 113 |
|
114 |
# Special case: utf8 BOM. |
|
115 |
# certain software (namely MS Office and notepad.exe insist on prefixing |
|
116 |
# data with a discouraged but valid byte order mark |
|
117 |
# if not removed, the first header field will not be recognized |
|
118 |
if ($header && $header->[0] && $self->encoding =~ /utf-?8/i) { |
|
119 |
$header->[0] =~ s/^\x{FEFF}//; |
|
120 |
} |
|
121 |
|
|
114 | 122 |
return unless $header; |
115 | 123 |
return $self->header([ map { lc } @$header ]); |
116 | 124 |
} |
Auch abrufbar als: Unified diff
Bei Importdaten das UTF8 BOM ignorieren.
behebt Bug 1872