serokell / haskell-with-utf8

Get your IO right on the first try
https://serokell.io/blog/haskell-with-utf8
52 stars 3 forks source link

accept a UTF-8 BOM for improved compatibility ? #14

Open simonmichael opened 2 years ago

simonmichael commented 2 years ago

Thanks for with-utf8 !

We would like to use it for hledger, but if I understand correctly it doesn't support a UTF-8 BOM marker. I know this is deprecated (https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom, but also https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8), but we aim to just work with random bank data from all over the world, and eg I found BOM support necessary to read Paypal CSV files in 2018. What are your thoughts on this ? Would it be a good improvement, making with-utf8 an easier choice ?