CSV output plugin: encoding

(Jean Marc Autexier) #1


I'm reading data usign jdbc from a database and writing them into a CSV file using the logstash csv output plugin. The data contains UTF-8 charcaters.
How can I configure the encoding of the csv fiel to UTF-8?


(Magnus Bäck) #2

I'd expect that to be the default. What are you getting now?

(Jean Marc Autexier) #3

thanks for your quick response.
Looking at the file, indeed it seems to be utf-8 (but I have to further check it).
But the file has no BOM, so some tools are confused...

(Jean Marc Autexier) #4

further checking the data, it looks like the problem is a backslash at the end of a string.
The backslash is not escaped, so it is escaping the quote.

String (from a jdbc db): test\
Generated (quoted) string in csv file: "test\" 
The expected quoted string in csv is: "test\\"

Updated, to avoid that discuss remove the backslashes

(Magnus Bäck) #5

That definitely sounds like a bug.

(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.