On Tue, Oct 27, 2009 at 3:57 PM, Philippos Apolinarius <phi50...@yahoo.ca> wrote: > > 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? > Converting a non-utf-8 input file to utf-8?
There's no obvious reason it shouldn't work, and you could use recode for the filter. However, wouldn't it be much better to just generate utf-8 in the first place? I find it hard to believe that it's really as hard as all that. -- Svein Ove Aas _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe