Re: UTF-8 decoding error

2006-10-09 Thread Duncan Coutts
On Mon, 2006-10-09 at 13:55 +0200, Christian Maeder wrote: > Duncan Coutts schrieb: > > On Fri, 2006-09-22 at 17:19 +0200, Christian Maeder wrote: > > >>> A simple script for the pgmF command > > >> The only disadvantage is that the filename in error and warning messages > >> is quite useless: >

Re: UTF-8 decoding error

2006-10-09 Thread Christian Maeder
Duncan Coutts schrieb: > On Fri, 2006-09-22 at 17:19 +0200, Christian Maeder wrote: >>> A simple script for the pgmF command >> The only disadvantage is that the filename in error and warning messages >> is quite useless: > I think you can fix this by pre-pending a {-# LINE #-} pragma in your >

Re: UTF-8 decoding error

2006-09-27 Thread Jan-Willem Maessen
On Sep 27, 2006, at 6:05 AM, Matthew Pocock wrote: Fortress (sun's possibly-not-vaporware hpc language) supports arbitrary unicode chars in code, and has an escape syntax for commonly used things. I have spent the past week writing Fortress code (which runs in parallel, even). But I'm p

Re: UTF-8 decoding error

2006-09-27 Thread Matthew Pocock
Fortress (sun's possibly-not-vaporware hpc language) supports arbitrary unicode chars in code, and has an escape syntax for commonly used things. Similarly, proof-general/isabelle supports tex-style escapes for symbols & greek. It seems to me that a pre-processor that turns human-friendly escape

Re: UTF-8 decoding error

2006-09-22 Thread Christian Maeder
Duncan Coutts schrieb: >> /tmp/ghc5667_0/ghc5667_248.hspp:299:17: > > I think you can fix this by pre-pending a {-# LINE #-} pragma in your > script. Something like: > > #!/bin/sh > ( echo "{-# LINE 1 \"$2\" #-}" ; iconv -f l1 -t utf-8 $2 ) > $3 Yes, thanks again! C.

Re: UTF-8 decoding error

2006-09-22 Thread Duncan Coutts
On Fri, 2006-09-22 at 17:19 +0200, Christian Maeder wrote: > Christian Maeder schrieb: > > Duncan Coutts schrieb: > >> There is iconv. It could be used as a pre-processor with ghc's -F -pgmF > >> -optF flags. > > > > NB: -F is missing in the Flag reference > > > > A simple script for the pgmF com

Re: UTF-8 decoding error

2006-09-22 Thread Christian Maeder
Christian Maeder schrieb: > Duncan Coutts schrieb: >> There is iconv. It could be used as a pre-processor with ghc's -F -pgmF >> -optF flags. > > NB: -F is missing in the Flag reference > > A simple script for the pgmF command > > #!/bin/sh > iconv -f l1 -t utf-8 $2 > $3 > > worked for me, than

Re: UTF-8 decoding error

2006-09-21 Thread Christian Maeder
Duncan Coutts schrieb: > There is iconv. It could be used as a pre-processor with ghc's -F -pgmF > -optF flags. NB: -F is missing in the Flag reference A simple script for the pgmF command #!/bin/sh iconv -f l1 -t utf-8 $2 > $3 worked for me, thanks! > Sorry there isn't a better solution at th

Re: UTF-8 decoding error

2006-09-21 Thread Christian Maeder
currently haddock correctly translates latin1 chars, ie. äöü to äöü So it would be nice if also ghc-6.6 could remain backward compatible by supporting latin1 sources. Christian Ross Paterson schrieb: > On Thu, Sep 21, 2006 at 10:15:45AM +0200, Christian Maeder wrote: >> How does haddock handle

Re: UTF-8 decoding error

2006-09-21 Thread Duncan Coutts
On Thu, 2006-09-21 at 10:15 +0200, Christian Maeder wrote: > Duncan Coutts schrieb: > > On Wed, 2006-09-20 at 18:14 +0200, Christian Maeder wrote: > >> How can I convince ghc version 6.5.20060919 to accept latin1 characters > >> in literals? > >> > >> I wish to keep source files (containing umlaut

Re: UTF-8 decoding error

2006-09-21 Thread Ross Paterson
On Thu, Sep 21, 2006 at 10:15:45AM +0200, Christian Maeder wrote: > How does haddock handle characters in comments? Section 3.8.3 of the Haddock manual: 3.8.3. Character references Although Haskell source files may contain any character from the Unicode character set, the

Re: UTF-8 decoding error

2006-09-21 Thread Christian Maeder
Duncan Coutts schrieb: > On Wed, 2006-09-20 at 18:14 +0200, Christian Maeder wrote: >> How can I convince ghc version 6.5.20060919 to accept latin1 characters >> in literals? >> >> I wish to keep source files (containing umlauts in strings) that can be >> compiled by either ghc-6.4.2 and ghc-6.6.

Re: UTF-8 decoding error

2006-09-20 Thread Duncan Coutts
On Wed, 2006-09-20 at 18:14 +0200, Christian Maeder wrote: > How can I convince ghc version 6.5.20060919 to accept latin1 characters > in literals? > > I wish to keep source files (containing umlauts in strings) that can be > compiled by either ghc-6.4.2 and ghc-6.6. You can use numeric escapes

Re: UTF-8 decoding error

2006-02-10 Thread Simon Marlow
Christian Maeder wrote: Simon Marlow wrote: Christian Maeder wrote: I'm tempted to replace "ä" bei "\228" in literals. What does haddock do with utf-8 in comments? Will DrIFT -- using read- and writeFile -- still work correctly? The problem I fear is that writeFile does not produce a utf-

Re: UTF-8 decoding error

2006-02-08 Thread Christian Maeder
Simon Marlow wrote: Christian Maeder wrote: I'm tempted to replace "ä" bei "\228" in literals. What does haddock do with utf-8 in comments? Will DrIFT -- using read- and writeFile -- still work correctly? The problem I fear is that writeFile does not produce a utf-8 encoded file: writeFile "

Re: UTF-8 decoding error

2006-02-03 Thread Simon Marlow
Christian Maeder wrote: So - do you need Latin-1, or could you use UTF-8? I'm not amused to change the encoding of many haskell source files (particular of those that are not mine). Fair enough, but there will have to be some way to specify the encoding, either via a pragma, command-line

Re: UTF-8 decoding error

2006-02-03 Thread Christian Maeder
Simon Marlow wrote: So - do you need Latin-1, or could you use UTF-8? I'm not amused to change the encoding of many haskell source files (particular of those that are not mine). These files can then no longer be compiled by earlier ghcs (though I don't understand, how ghc-6.4.1 recognises

Re: UTF-8 decoding error

2006-02-03 Thread Simon Marlow
Christian Maeder wrote: with ghc-6.5.20060201 I get a "UTF-8 decoding error" for latin1 characters in my string literals. Do I have to change my sources or can I set a certain environment variable? I have [EMAIL PROTECTED] and LC_CTYPE not set (which is ok for hugs) GHC is now expected sour