<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">In a private email to Ketil Malde, I said that Ocaml programmers use the preprocessor to solve the problem of character encoding:<br><br>ocamlopt -pp myfilter.exe myprogram.ml -o myoutput.exe<br><br>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<br><br>ghc -pgmF myfilter.exe myprogram.hs --make<br><br>If the answer is yes, what should I substitute for myfilter.exe?<br><br><br>--- On <b>Tue, 10/27/09, Ketil Malde <i>&lt;ketil@malde.org&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Ketil Malde &lt;ketil@malde.org&gt;<br>Subject: Re: [Haskell-cafe] A 3 line program --&gt; Reid, Don, Daniel<br>To: haskell-cafe@haskell.org<br>Received: Tuesday, October 27, 2009, 2:06 AM<br><br><div
 class="plainMail">Colin Paul Adams &lt;<a ymailto="mailto:colin@colina.demon.co.uk" href="/mc/compose?to=colin@colina.demon.co.uk">colin@colina.demon.co.uk</a>&gt; writes:<br><br>&gt;&nbsp; &nbsp;&nbsp;&nbsp;Brandon&gt; So yes, it's reasonable to "blame" the language (spec).<br><br>On the other hand, the sooner users can get moving to utf-8, the sooner<br>we can get eliminate these kinds of problems.<br><br>&gt; Note also that it mentions the Unicode character set, not a particular<br>&gt; Unicode encoding scheme.<br><br>&gt; To me that implies that an implementation must support all 7 encoding<br>&gt; schemes, not just UTF-8.<br><br>...but not latin1, which appeared to be the problem here.<br><br>&gt; At which point you probably want to make use of iconv, so you might as<br>&gt; well support all iconv-supported encodings.<br><br>Interestingly, Wikipedia [0] says that "Unicode-aware programs are<br>required to display, print and manipulate [UTF-32 and
 -16]", although no<br>source is provided for this requirement.<br><br>But until somebody actually has Haskell sources in a Unicode-encoding<br>different from utf-8, I'd much prefer developers to spend their time on<br>something more useful.<br><br>(And the workaround is just one line in a Makefile, isn't it?)<br><br>-k<br><br>[0] <a href="http://en.wikipedia.org/wiki/Comparison_of_Unicode_encodings" target="_blank">http://en.wikipedia.org/wiki/Comparison_of_Unicode_encodings</a><br>-- <br>If I haven't seen further, it is by standing in the footprints of giants<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a ymailto="mailto:Haskell-Cafe@haskell.org" href="/mc/compose?to=Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></div></blockquote></td></tr></table><br>



      <hr size=1>The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo! <a href="http://downloads.yahoo.com/ca/internetexplorer/"><b>Get it Now for Free!</b></a>