[Hackage] #626: Package build error due to unicode

Hackage cvs-ghc at haskell.org
Tue Oct 18 22:23:00 CEST 2011


#626: Package build error due to unicode
----------------------------+-----------------------------------------------
  Reporter:  basvandijk     |        Owner:          
      Type:  defect         |       Status:  reopened
  Priority:  normal         |    Milestone:          
 Component:  Cabal library  |      Version:  1.6.0.1 
  Severity:  normal         |   Resolution:          
  Keywords:                 |   Difficulty:  unknown 
Ghcversion:                 |     Platform:          
----------------------------+-----------------------------------------------

Comment(by nomeata):

 I am currently testing this patch, and will report if it works:

 {{{
 --- ghc-7.0.4.orig/libraries/Cabal/Distribution/Simple/Haddock.hs
 +++ ghc-7.0.4/libraries/Cabal/Distribution/Simple/Haddock.hs
 @@ -109,7 +109,7 @@ import Data.Maybe    ( fromMaybe, listTo

  import System.FilePath((</>), (<.>), splitFileName, splitExtension,
                         normalise, splitPath, joinPath)
 -import System.IO (hClose, hPutStrLn)
 +import System.IO (hClose, hPutStrLn, hSetEncoding, utf8)
  import Distribution.Version

  -- Types
 @@ -380,6 +380,7 @@ renderArgs verbosity version args k = do
    createDirectoryIfMissingVerbose verbosity True outputDir
    withTempFile outputDir "haddock-prolog.txt" $ \prologFileName h -> do
            do
 +             hSetEncoding h utf8
               hPutStrLn h $ fromFlag $ argPrologue args
               hClose h
               let pflag = (:[]).("--prologue="++) $ prologFileName
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/626#comment:4>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects



More information about the cabal-devel mailing list