
This has to be one of the most irritating ways a program can fall over. Can't the Haskell RTS try just a /little/ harder to help the poor programmer? For example by saying what sort of exception it is, and (if it's a dynamic exception) what type it has?

Good morning, The following haskell program : --<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< module Main where accentLetters :: String accentLetters = "éàô" main :: IO () main = do putStr (show accentLetters) -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> after being compiled will give the result : "\233\224\244" But, exactly the same program, without the "show" function will give the result: éàô Is there some way to have "show" show all the printable characters, even those represented by a value greater than the US-ASCII 7 bits (127) ? Thank you Francis Girard LE CONQUET France

On Tue, Dec 16, 2003 at 07:49:26AM +0100, francis.girard@free.fr wrote:
Good morning,
The following haskell program :
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< module Main where
accentLetters :: String accentLetters = "ИЮТ"
main :: IO () main = do putStr (show accentLetters) -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
after being compiled will give the result :
"\233\224\244"
But, exactly the same program, without the "show" function will give the result:
ИЮТ
Is there some way to have "show" show all the printable characters, even those represented by a value greater than the US-ASCII 7 bits (127) ?
The specific octet may be printable character or not depending on your charset. For instance, your letters are printable in koi8-r (showing upper Russian I YU T), but not in cp866 (al least recode cp866..koi8-r fails on them). The "show" function represents your over-127 bytes in portable and readable (by read) way and, I think, it does right. -- Max
participants (3)
-
francis.girard@free.fr
-
George Russell
-
Max Kirillov