[Haskell-cafe] A 3 line program. Preprocessor?
Philippos Apolinarius
phi500ac at yahoo.ca
Tue Oct 27 10:57:27 EDT 2009
In a private email to Ketil Malde, I said that Ocaml programmers use the preprocessor to solve the problem of character encoding:
ocamlopt -pp myfilter.exe myprogram.ml -o myoutput.exe
I wonder whether a similar solution could be used with Haskell. I am new to Haskell, but I suppose that Haskell may accept something like
ghc -pgmF myfilter.exe myprogram.hs --make
If the answer is yes, what should I substitute for myfilter.exe?
--- On Tue, 10/27/09, Ketil Malde <ketil at malde.org> wrote:
From: Ketil Malde <ketil at malde.org>
Subject: Re: [Haskell-cafe] A 3 line program --> Reid, Don, Daniel
To: haskell-cafe at haskell.org
Received: Tuesday, October 27, 2009, 2:06 AM
Colin Paul Adams <colin at colina.demon.co.uk> writes:
> Brandon> So yes, it's reasonable to "blame" the language (spec).
On the other hand, the sooner users can get moving to utf-8, the sooner
we can get eliminate these kinds of problems.
> Note also that it mentions the Unicode character set, not a particular
> Unicode encoding scheme.
> To me that implies that an implementation must support all 7 encoding
> schemes, not just UTF-8.
...but not latin1, which appeared to be the problem here.
> At which point you probably want to make use of iconv, so you might as
> well support all iconv-supported encodings.
Interestingly, Wikipedia [0] says that "Unicode-aware programs are
required to display, print and manipulate [UTF-32 and -16]", although no
source is provided for this requirement.
But until somebody actually has Haskell sources in a Unicode-encoding
different from utf-8, I'd much prefer developers to spend their time on
something more useful.
(And the workaround is just one line in a Makefile, isn't it?)
-k
[0] http://en.wikipedia.org/wiki/Comparison_of_Unicode_encodings
--
If I haven't seen further, it is by standing in the footprints of giants
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe at haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!
http://www.flickr.com/gift/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091027/e956394d/attachment.html
More information about the Haskell-Cafe
mailing list