1

I am looking for the equivalent setting as the PGADMIN setting Write BOM for UTF files which will cause saved files to be saved with/without the BOM.

I've found settings in DBeaver when exporting data, but nothing that would configure new (or existing) files to be saved without the BOM.

enter image description here

How do I configure DBeaver to save files without a BOM for UTF files/

6
  • What are you using on these files that is too stupid to understand the BOM? Why not just cut it out after the fact if you must -- it's the first 3 bytes. Aug 27, 2018 at 3:03
  • 1
    @EvanCarroll: probably psql ;)
    – user1822
    Aug 27, 2018 at 6:23
  • @a_horse_with_no_name seems to work fine for me with -f file and < file Aug 27, 2018 at 6:27
  • yes, psql. And the questions is for configuring DBeaver. There are numerous ways to alter the file after the fact, which is what I'm doing now. Aug 27, 2018 at 10:26
  • Can you also configure to import CSV files with/without BOM?
    – zygimantus
    Oct 23, 2019 at 11:58

1 Answer 1

0

Using sed

You can always cut out three bytes (the bom) with sed

sed -i '1 s/^\xef\xbb\xbf//' *.txt

That'll actually do it in place.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.