Logstash - Problem when index first line of a csv file with "?"

Hi,

Whenever I index a CSV file , the first line is preceded by a question mark "?". So my date is not properly indexed.

"Date": "?2015-01-01 01:00:00",

So the date is not correctly read:

ttags _dateparsefailure

and the timestamp is false:

@timestamp June 7th 2016, 16:12:11.845

Example:

{
"_index": "index_capa_planning",
"_type": "core2",
"_id": "AVUrNNqXfO_P_5NSnB1k",
"_score": null,
"_source": {
"message": "?2015-01-01 01:00:00;CR;2;480;A\r",
"@version": "1",
"@timestamp": "2016-06-07T14:12:11.845Z",
"path": "E:\\TDB\Datasource\capa_planning.csv",
"host": "test",
"type": "core2",
"Date": "?2015-01-01 01:00:00",
"LPAR": "CR",
"NB_DRIVE": 2,
"GB_SAVED": 480,
"SALLE": "A",
"tags": [
"_dateparsefailure"
]
},
"fields": {
"@timestamp": [
1465308731845
]
},
"sort": [
1465308731845
]
}

Can help me ?

What does your filter configuration look like?

My logstash configuration is:

I suspect that the problem is caused by a powershelll command that I used to write my csv source:
If I used write-content I don't have problem
I I used out-file command I have problem...

See http://stackoverflow.com/questions/5596982/using-powershell-to-write-a-file-in-utf-8-without-the-bom.

Thank you !