markdrago / pgsanity

Check syntax of postgresql sql files
MIT License
316 stars 28 forks source link

pgsanity should work sanely when encountering a unicode BOM #5

Open markdrago opened 11 years ago

markdrago commented 11 years ago

ecpg, the program which pgsanity depends on, chokes on a unicode BOM (https://en.wikipedia.org/wiki/Byte_order_mark). Pgsanity should strip out unicode BOMs before sending the text off to ecpg.

jayvdb commented 5 years ago

At least for file opens, https://github.com/timrburnham/bom_open/ might be a nice way to solve the problem. Note that we've fixed a few bugs since the last release, so it would be worth waiting until the next release is cut, which should be soon.