Re: To show or not to show french accents

2003-12-19 Thread francis . girard
Hello, What I don't understand is why you want show for this. As I mentioned earlier, to output strings and get accented characters, all you have to do is to output the string with putStr, and voilà, les signes diacritiques. Sometimes, I want to do cheap and dirty test programs that shows

RE: To show or not to show french accents

2003-12-19 Thread Simon Marlow
This discussion is getting a little out of hand ;-) An instance of Show should (but doessn't have to): - generate a rendering of its argument as a String that (a) follows the Haskell lexical syntax, and (b) with an appropriate instance of Read can reconstruct the

Re: To show or not to show french accents

2003-12-18 Thread Carsten Schultz
Hallo! On Thu, Dec 18, 2003 at 01:55:27PM +0100, [EMAIL PROTECTED] wrote: Well, I think there should probably be some internationalisation mechanism that tells the show function (to name one), according to some configuration, how to interpret a byte as a character. My understanding is that

Re: To show or not to show french accents

2003-12-18 Thread francis . girard
Good evening, OK. I don't know Haskell enough to argue. But I can't resist pointing out that reading a single byte having the value 233 (that is 'é') is certainly simpler than reading the four characters \233, parse it, and translate it into a single byte having the value 233 representing no

Re: To show or not to show french accents

2003-12-18 Thread Jon Fairbairn
On 2003-12-18 at 16:40+0100 [EMAIL PROTECTED] wrote: Good evening, OK. I don't know Haskell enough to argue. But I can't resist pointing out that reading a single byte having the value 233 (that is 'é') The problem is that if you are reading single bytes, 233 is not necessarily é. It

Re: To show or not to show french accents

2003-12-18 Thread Dimitry Golubovsky
I would support the point of view that show should output escapes when showing characters outside ASCII. This is sort of a transport format (together with read), therefore it must be a GCD for all possible input encodings. UTF-8 might be alternative, but it would require to be equally

RE: To show or not to show french accents

2003-12-16 Thread Simon Marlow
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