To show or not to show french accents

2003-12-15 Thread francis . girard
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

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 : >

Re: To show or not to show french accents

2003-12-17 Thread Max Kirillov
On Tue, Dec 16, 2003 at 07:49:26AM +0100, [EMAIL PROTECTED] wrote: > Good morning, > > The following haskell program : > > --<< > module Main where > > accentLetters :: String > accentLetters = "ИЮТ" > > main :: IO () > main = do putStr (show accentLetters) > -->

Re: To show or not to show french accents

2003-12-18 Thread francis . girard
Good afternoon, 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. Frankly, I see no good reason why we should be satisfied we the dinosaurus 7 bits ex

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 tha

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 n

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 é.

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 support

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 "show

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 ori

Re: To show or not to show french accents

2003-12-19 Thread MR K P SCHUPKE
>The problem is that if you are reading single bytes, 233 is >not necessarily é. Erm, Internationalisation is not my thin as such... but I can't help commenting that from a systems point of view this is an utterly bad sitiation to be in... I though Haskell used unicode? I thought in unicode the id

Re: To show or not to show french accents

2003-12-19 Thread Marcin Benke
MR K P SCHUPKE wrote: The problem is that if you are reading single bytes, 233 is not necessarily é. Erm, Internationalisation is not my thin as such... but I can't help commenting that from a systems point of view this is an utterly bad sitiation to be in... I though Haskell used unicode? I