Ticket #1744 (closed merge: fixed)
treat byte order mark as zero-width whitespace
|Reported by:||igloo||Owned by:||igloo|
|Type of failure:||Difficulty:||Unknown|
|Test Case:||Blocked By:|
The U+FEFF ZERO WIDTH NO-BREAK SPACE Unicode character, better known as BYTE ORDER MARK (BOM), currently gives a lexical error:
$ printf '\xEF\xBB\xBF\nz = "str"\n' > z.hs $ ghci z.hs GHCi, version 220.127.116.1170927: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. z.hs:1:0: lexical error at character '\65279' Failed, modules loaded: none. Prelude> Leaving GHCi.
The character is only in categories Other and Format, not Space, but I think we should lex it as whitespace anyway (with zero width for the purposes of the layout rule). Ideally Haskell' would do likewise.