
1 Feb
2008
1 Feb
'08
8:29 a.m.
Bulat Ziganshin
may be it's too draconian restriction but i proposed just to use new library in the new code.
For backwards compatibility, I agree it would be preferable to retain the current default implementation, but opinions appear to differ. Whatever.
f <- openFile "name" content <- readLine f -- read first line using Latin-1 f' <- withEncoding (lookup content) f str <- readLine f' -- read second line using encoding given on first line
This is clear enough, but for the BOM-dependent decoding, you may have to do the equivalent of having the next call to 'readLine' re-read the first line instead. -k -- If I haven't seen further, it is by standing in the footprints of giants