News for hackers. Stuff that matters.
Re:Finding CSV files that start with a BOM using ripgrep by burntsushi on Saturday May 29, 2021 @07:42AM (#27324614)
From Unicode 23.8[1]:

> In UTF-8, the BOM corresponds to the byte sequence <EF BB BF>. Although there are never any questions of byte order with UTF-8 text, this sequence can serve as signature for UTF-8 encoded text where the character set is unmarked. As with a BOM in UTF-16, this sequence of bytes will be extremely rare at the beginning of text files in other character encodings. For example, in systems that employ Microsoft Windows ANSI Code Page1252, <EF16 BB16 BF16> corresponds to the sequence <i diaeresis, guillemet, inverted question mark> “ï » ¿”.

In practice, the UTF-8 BOM pops up. I usually see it on Windows.

[1] - http://www.unicode.org/versions/Unicode13.0.0/ch23.pdf#G1963...

Re:Finding CSV files that start with a BOM using ripgrep by cerved on Saturday May 29, 2021 @07:48AM (#27324641)
it pops up a lot and it's annoying as it's an invisible diff in git
Re:Finding CSV files that start with a BOM using ripgrep by Measter on Saturday May 29, 2021 @02:48PM (#27327366)
I've also had fun due to a BOM. In my case it was for configuring the Assetto Corsa server. It takes an INI for the entry list, but halts parsing if it encounters unexpected input. Without any kind of message. The BOM was an unexpected input, so the server just immediately shut down because the entry list was "empty".

That was a fun, and totally unstressful way to begin my time managing a racing league's race events.