Re: [GHC] #6016: On Windows, runhaskell hits an error on UTF-8 files with a BOM
#6016: On Windows, runhaskell hits an error on UTF-8 files with a BOM -------------------------------------+------------------------------------- Reporter: vsajip | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.0.4 (Parser) | Keywords: BOM Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: GHC | Related Tickets: #1744 rejects valid program | Test Case: | Blocking: | Differential Revisions: Phab:D176 | -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"9e939403241b758a685834c9ff62edcd3172a2cf/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="9e939403241b758a685834c9ff62edcd3172a2cf" StringBuffer should not contain initial byte-order mark (BOM) Summary: Just skipping over a BOM, but leaving it in the Stringbuffer, is not sufficient. The Lexer calls prevChar when a regular expression starts with '^' (which is a shorthand for '\n^'). It would never match on the first line, since instead of '\n', prevChar would still return '\xfeff'. Test Plan: validate Reviewers: austin, ezyang Reviewed By: austin, ezyang Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D176 GHC Trac Issues: #6016 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6016#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC