
GHC 5.02.[23] seems to be quite strict about literal strings in source code. I presume this is a feature. :-) However this is annoying for people who want to use wide chars in strings in source code. (Though I realise that doing so is not very "portable".)
To illustrate, the following program
main :: IO () main = let ja = 'Japanese character' in putChar ja >> putChar '\n'
results in
Compiling Main ( test-ja.hs, interpreted ) test-ja.hs:3: error in character literal Failed, modules loaded: none.
with both ghc and ghci.
As other folk noted, you should be fine with ISO8859-1 characters but we don't have support for Unicode yet. There has been discussion at various points in the past on how to do this, and Marcin Kowalczyk has some ideas on how the Haskell interface to multi-coded text I/O should look. It is possible that we could just support UTF-8 in source files without going the whole hog and providing Unicode I/O, however. As usual, contributions are welcome :-) Cheers, Simon
participants (1)
-
Simon Marlow