handling of multibyte char strings

John Meacham john@repetae.net
Sat, 13 Apr 2002 17:01:36 -0700


this has bitten me in the last day or so too. i regularly use utf-8 in
my comments and would like to see them in string literals too.

foo :: ∀αβ . α → β 
looks much prettier than the alternative.

just utf-8 support would be quite easy and cover 99% of peoples needs
anyway.
	John


On Sun, Apr 14, 2002 at 01:57:31AM +0900, Jens Petersen wrote:
> 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.
> 
> Is anything allowed in literal strings except ascii?  utf-8?

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john@repetae.net
---------------------------------------------------------------------------