On 13-Sep-2004, Glynn Clements <[EMAIL PROTECTED]> wrote: > > However, If you treat them as ISO-8859-* (it doesn't matter which one, > so long as you're consistent), the Haskell I/O functions will at least > pass them through unmodified. Consider a trivial "cp" program: > > main = do > [src, dst] <- getArgs > text <- readFile src > writeFile dst text > > If the assumed encoding is ISO-8859-*, this program will work > regardless of the filenames which it is passed or the contents of the > file (modulo the EOL translation on Windows).
And also modulo the control-Z issue on Windows, and the EOL issue on old Macs. But "this program will work (modulo <important issue>)" is just another way of saying "this program won't work". The program above may be a reasonably way of copying text files, but it does not work for copying binary files. -- Fergus J. Henderson | "I have always known that the pursuit Galois Connections, Inc. | of excellence is a lethal habit" Phone: +1 503 626 6616 | -- the last words of T. S. Garp. _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
