So I got this csv file generated by dbeaver to trigger some automation task but my code can’t process it. The file is perfect until I open it on excel and I see this . So this is the culprit. Actually it’s quite famous and known as Byte Order Mark (BOM)

Unicode text can optionally start with a byte order mark (BOM) to signal the endianness of the file or stream. Its code point is U+FEFF. In UTF-32 for example, a big-endian file should start with 00 00 FE FF; a little-endian should start with FF FE 00 00.

In case of DBeaver, we can uncheck Insert BOM option when generate csv.

dbeaver pom settings