0

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/

  • 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. – Evan Carroll Aug 27 '18 at 3:03
  • 1
    @EvanCarroll: probably psql ;) – a_horse_with_no_name Aug 27 '18 at 6:23
  • @a_horse_with_no_name seems to work fine for me with -f file and < file – Evan Carroll Aug 27 '18 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. – Jay Cummins Aug 27 '18 at 10:26
  • Can you also configure to import CSV files with/without BOM? – zygimantus Oct 23 at 11:58
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, privacy policy and cookie policy

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