[Hackage] #609: ghc-pkg dump encoding
 
            #609: ghc-pkg dump encoding ----------------------------+----------------------------------------------- Reporter: igloo | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.1 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- With ghc-6.12.0.20091120, `FunctorSalad` on IRC found: {{{ when I try to run some Setup.hs (of any package, apparently), it compiles, but ./Setup configure crashes with: Setup: fd:5: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character) *** glibc detected *** ./Setup: double free or corruption (!prev): 0x098953a0 *** }}} As far as I can tell, the problem is that `./Setup` finds `/usr/bin/ghc` which is 6.10.4, and the output of `ghc-pkg dump | hexdump -C` includes: {{{ 00038060 63 6f 70 79 72 69 67 68 74 3a 20 a9 20 32 30 30 |copyright: . 200| }}} i.e. there's a latin-1 copyright symbol 0xA9. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/609 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
 
            #609: ghc-pkg dump encoding ----------------------------+----------------------------------------------- Reporter: igloo | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by igloo): * version: 1.6.0.1 => HEAD -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/609#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
 
            #609: ghc-pkg dump encoding ----------------------------+----------------------------------------------- Reporter: igloo | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment (by duncan): Gah! We should agree between Cabal and ghc/ghc-pkg whether installed package info files are in Latin1 or UTF-8. I vote for them always being UTF-8 (not locale) and for all of ghc/ghc-pkg/Cabal validating. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/609#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
 
            #609: ghc-pkg dump encoding ----------------------------+----------------------------------------------- Reporter: igloo | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment (by igloo): Whatever we decide should happen in the future, existing installations may have non-UTF-8 package databases. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/609#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
 
            #609: ghc-pkg dump encoding ----------------------------+----------------------------------------------- Reporter: igloo | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment (by duncan): Replying to [comment:3 igloo]:
Whatever we decide should happen in the future, existing installations may have non-UTF-8 package databases.
ghc and ghc-pkg do not have to deal with existing non-utf8 package dbs because they only read/write them for package dbs for ghc 6.12. Cabal may have to if cabal-install is built with 6.12 but used with `ghc-pkg-6.10 dump`. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/609#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
 
            #609: ghc-pkg dump encoding
----------------------------+-----------------------------------------------
  Reporter:  igloo          |        Owner:         
      Type:  defect         |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:  HEAD   
  Severity:  normal         |   Resolution:         
  Keywords:                 |   Difficulty:  unknown
Ghcversion:                 |     Platform:         
----------------------------+-----------------------------------------------
Comment (by guest):
 GHC now always uses UTF-8 for the output of `ghc-pkg dump`, and the input
 to `ghc-pkg register` and `ghc-pkg update`.
 {{{
 Wed Nov 25 06:17:30 PST 2009  Simon Marlow 
 
            #609: ghc-pkg dump encoding
----------------------------+-----------------------------------------------
  Reporter:  igloo          |        Owner:           
      Type:  defect         |       Status:  closed   
  Priority:  normal         |    Milestone:  Cabal-1.8
 Component:  Cabal library  |      Version:  HEAD     
  Severity:  normal         |   Resolution:  fixed    
  Keywords:                 |   Difficulty:  unknown  
Ghcversion:                 |     Platform:           
----------------------------+-----------------------------------------------
Changes (by duncan):
  * status:  new => closed
  * resolution:  => fixed
  * milestone:  => Cabal-1.8
Comment:
 {{{
 Sun Nov 29 15:33:41 GMT 2009  Duncan Coutts 
participants (1)
- 
                 Hackage Hackage