Text in Haskell: A PROPOSAL

Ashley Yakeley ashley@semantic.org
Thu, 8 Aug 2002 03:16:09 -0700


At 2002-08-08 02:54, Ketil Z. Malde wrote:

>Would it be sufficient to have "raw" socket/file functions using
>[Word8], 

This would certainly be a good thing.

>and let the "standard" functions (e.g. readFile) convert to
>[Char] according to current locale settings?

The notion of "current locale settings" (including newline conventions) 
bothers me. I'd like my Haskell program to do the same thing regardless 
of which machine executes it -- particularly these days when files get 
shared around a lot.

Do we really need "text mode" anymore?

>  With, perhaps, UTF-8 as a reasonable default?

Perhaps it should _always_ be UTF-8? Or is that too slow in some cases? 
It certainly raises "seek" issues as one Char codepoint may be 
represented by several octets.

>(And of course, en/decoding functions readily available for manual
>use) 

Yes.


-- 
Ashley Yakeley, Seattle WA