
On Tue, Feb 26, 2008 at 09:30:41AM +0000, Duncan Coutts wrote:
So if we use files opened in binary mode and account for line end differences then this is portable and doesn't make it harder for GHC to switch text handles to use a more sensible encoding.
Yes. We have to handle line-endings independently of the host system anyway, because the files we're reading could have been created on a different system.
It doesn't actually change the fact that our error messages will print garbage when they include snippets of a .cabal file that contained non-ISO-8859-1 chars.
Yes, because GHC's text handles cannot cope with such characters. So instead of trying to patch around that, how about just replacing these characters with "???" or "" on output (if compiling with GHC)? It's not pretty, but hopefully it's temporary, and these are only error message we're talking about.