
21 Nov
2010
21 Nov
'10
12:49 a.m.
Hello, I have a very strange (for me) problem that I manage to reduce to this : I have a small program that reads a file with 1 only character (è = e8) The program is ftest2.hs : import IO import Data.Maybe tfind s = lookup (head s) $ zip ['\xe8', '\xde'] "12" main = do h<- readFile "g:\\CODE\\rlib\\test.txt" putStrLn h print $ tfind h I compile it from command line : ghc --make ftest2.hs Now the weird results : 1/ cmd line: ftest2.exe è Just '2' 2/ ghci Prelude> :!ftest2.exe è Just '2' 3/WinGHci Prelude> :! ftest2.exe è Just '1' I tested different variants, there is always a difference. Any idea to help me trace this behaviour ?