[Hackage] #533: Cabal file in UTF-8 format can not be handled by Cabal
#533: Cabal file in UTF-8 format can not be handled by Cabal ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.2 Severity: normal | Keywords: UTF-8 Difficulty: unknown | Ghcversion: 6.10.1 Platform: Windows | ----------------------------+----------------------------------------------- According to http://www.haskell.org/ghc/docs/latest/html/Cabal/authors.html , a .cabal file should be a Unicode UTF-8 text file; when I change the file to UTF-8 with notepad, Cabal can not handle it:
runhaskell Setup configure Setup: xyz.cabal:1: unrecognised field or section: "\65279Name: xyz"
Changing this file back to ANSI solves the problem. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/533> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#533: Cabal file in UTF-8 format can not be handled by Cabal ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.2 Severity: normal | Resolution: Keywords: UTF-8 | Difficulty: unknown Ghcversion: 6.10.1 | Platform: Windows ----------------------------+----------------------------------------------- Comment (by ross): '\65279' = '\xFEFF' = ZERO WIDTH NO-BREAK SPACE = BYTE ORDER MARK, so it seems notepad inserts a UTF-encoded BOM at the start of the file. Cabal needs to ignore BOMs. (They're classified as format characters, not spaces, in Unicode.) -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/533#comment:1> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#533: Cabal file in UTF-8 format can not be handled by Cabal ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.2 Severity: normal | Resolution: Keywords: UTF-8 | Difficulty: very easy (<1 hour) Ghcversion: 6.10.1 | Platform: Windows ----------------------------+----------------------------------------------- Changes (by duncan): * difficulty: unknown => very easy (<1 hour) Comment: Should be easy to drop a BOM at the beginning of the input. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/533#comment:2> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#533: Cabal file in UTF-8 format can not be handled by Cabal ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.2 Severity: normal | Resolution: fixed Keywords: UTF-8 | Difficulty: very easy (<1 hour) Ghcversion: 6.10.1 | Platform: Windows ----------------------------+----------------------------------------------- Changes (by duncan): * status: new => closed * resolution: => fixed Comment: {{{ Sun May 31 23:50:08 BST 2009 Duncan Coutts <duncan@haskell.org> * Ignore a byte order mark (BOM) when reading UTF8 text files Yes of course UTF8 text files should not use the BOM but notepad.exe does anyway. Fixes ticket #533. }}} -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/533#comment:3> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
participants (1)
-
Hackage