Bad UTF-8 encoding Latin characters with groovy

hi,

im using groovy to append an array of nested object on elasticsearch from a csv file

when groovy insert the first object there is no encoding problem, otherwise when he append the array with others objects i have list of words poorly encoded.

im using the same config file with logstash-2.2.2 and it works fine !

the problem only with logstash-2.3.0 and logstash-5.0.0.alpha1

output {
    elasticsearch {
        hosts => ["localhost:9200"]
        index => "accounts"
        document_id => "%{id}"
        action => "update"
        script_lang => "groovy"
        script => "ctx._source.id = %{id}; if (ctx._source.containsKey('items')) {ctx._source.items += [a1:'%{a1}',a2:'%{a2}',a3:'%{a3}',a4:'%{a4}'];} else {ctx._source.items = [[a1:'%{a1}',a2:'%{a2}',a3:'%{a3}',a4:'%{a4}']]; }"
        script_type => "inline"
        scripted_upsert => true
        codec => plain {
            charset => "UTF-8"
        }
    }
}

cordially