#2426: ghc-pkg should treat package.conf as UTF8
----------------------+-----------------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.10 branch
Component: Compiler | Version: 6.8.3
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
----------------------+-----------------------------------------------------
Comment (by duncan):
This is easy. Just use `readUTF8File` from `Distribution.Simple.Utils`
rather than `readFile` in ghc-pkg. Though for reading from stdin it's
slightly harder as we need to put stdin into binary mode first and then
use `fromUTF8`.
The slightly trickier part is testing. We should at least check that
invalid UTF-8 is rejected appropriately (the parsing should do that for
us) and that valid multi-byte UTF-8 is round-tripped correctly. I'm not
sure what to do for `ghc-pkg describe` when it's going to a console that
isn't utf-8.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2426#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs