dbeaver icon indicating copy to clipboard operation
dbeaver copied to clipboard

Flat file (csv) with Byte Order Marker messes up the name of the first column

Open jk3us opened this issue 10 years ago • 3 comments

If you try to "open" a csv that has a utf byte order mark using the flat file connection type, it puts a few garble characters at the beginning of the first column name like "column1".

The file I found about about this on was from a "Export Restultset" operation to the csv file, so dbeaver knows how to write the BOM, but not consume it, I guess.

Opening the file in vim and running the :nobomb command (then saving it) removes the mark and everything works fine.

jk3us avatar Aug 17 '16 22:08 jk3us

Looks like CSV JDBC driver (http://csvjdbc.sourceforge.net/) doesn't support BOM by default. There is nothing I can do with this. But you can disable BOM in DBeaver CSV export (there is a special option for that in export wizard).

serge-rider avatar Aug 18 '16 09:08 serge-rider

Same issue occurs when trying to import a CSV file that has BOM using the Data Transfer wizard. Is that also because of the JDBC CSV driver? Thanks!

antoniustefan avatar Jan 13 '21 19:01 antoniustefan

According to https://sourceforge.net/p/csvjdbc/feature-requests/103/ CSV JDBC driver supports BOM (since version 1.0.35).

serge-rider avatar Jan 14 '21 02:01 serge-rider