To show or not to show french accents

francis.girard at free.fr francis.girard at free.fr
Thu Dec 18 16:40:16 EST 2003


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 matter what character in your character table.

But, I don't care that much and I'm sorry for this.

Best regards,

Francis Girard
LE CONQUET
France

Selon Carsten Schultz <carsten at gnocchi.dialup.fu-berlin.de>:

> Hallo!
> 
> On Thu, Dec 18, 2003 at 01:55:27PM +0100, francis.girard at free.fr 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 `show' should work with `read' and possibly
> produce output that can be parsed by the Haskell parser. It is not a
> pretty printing function.
> 
> > Frankly, I see no good reason why we should be satisfied we the dinosaurus
> 7 
> > bits except perhaps because 7 bits is sufficient for english.
> > 
> > I am talking about respect for non english speaking people.
> > 
> > But if nobody cares ...
> 
> I, too, speak a language that can't be fully expressed in ASCII, but I
> do not think that the behaviour of `show' should be changed in this
> respect.
> 
> Greetings,
> 
> Carsten
> 
> -- 
> Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
> http://carsten.fu-mathe-team.de/
> PGP/GPG key on the pgp.net key servers, 
> fingerprint on my home page.
> 

> Original message :
>
>
> 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) ?



More information about the Glasgow-haskell-users mailing list