On Mon Mar 09 06:03:21 2015, [email protected] wrote: > For the record this was recently discussed on IRC starting at > <http://irclog.perlgeek.de/perl6/2015-03-06#i_10234453>. Excerpt of > constructive comments: > > moritz: open() could have a :strip-bom option or so > you could pass :strip-bom even on linux > > perl6_newbee: I would like it the other way. To have BOM striped > other the :dont-strip-bom attribute is set > > PerlJam what if it's *not* a BOM, but looks like one? > > moritz: .u FEFF > yoleaux: U+FEFF ZERO WIDTH NO-BREAK SPACE [Cf] (<control>) > moritz: well, the BOM is also a valid zero-widht non-breaking > space > > jnthn: If we implemnt this, then it belongs, imo, in the UTF-8 > decoding handling > I don't think there's a problem with most sane Windows > programs if you don't write out a BOM. > But on the whole I suspect not tolerating one when > reading is going to just create a lot of questions > While tolerating it is unlikely to burn anybody if it's > implemented in the correct place. > > TimToady: +1 to always stripping BOM on textual input
Now implemented in Moar's UTF-8 decoder, and covered by S16-io/bom.t in the spectests.
