To show or not to show french accents

francis.girard at free.fr francis.girard at free.fr
Thu Dec 18 13:55:27 EST 2003


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 except perhaps because 7 bits is sufficient for english.

I am talking about respect for non english speaking people.

But if nobody cares ...

Cheers,

Francis Girard
LE CONQUET
France

Selon Max Kirillov <max630 at mail.ru>:

> On Tue, Dec 16, 2003 at 07:49:26AM +0100, francis.girard at 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
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
> 




More information about the Glasgow-haskell-users mailing list