DBeaver and Byte Order Mark

Iman Tung
May 16, 2021

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 the case of DBeaver, we can uncheck Insert BOM option when generating CSV.

Previously published in https://imantung.github.io at 27 Aug 2017

--

--

Iman Tung

Technology to write, life to grateful. Overthinking is good, only if it has the output. Fundamental is the main concern.