Ticket #1744 (closed merge: fixed)
treat byte order mark as zero-width whitespace
| Reported by: | igloo | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.8.2 |
| Component: | Compiler (Parser) | Version: | 6.8 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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 6.8.0.20070927: 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.
Change History
Note: See
TracTickets for help on using
tickets.
