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
> The following haskell program :
>
> --<<
> module Main where
>
> accentLetters :: String
> accentLetters = "éàô"
>
> main :: IO ()
> main = do putStr (show accentLetters)
> -->>
>
> after being compiled will give the result :
>
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)
> -->
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
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
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
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 é.
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
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
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
>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
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
12 matches
Mail list logo