[Colin Paul Adams] Re: Proposal: Define UTF-8 to be the encoding of Haskell source files
Colin Paul Adams
colin at colina.demon.co.uk
Wed Apr 6 17:34:13 CEST 2011
I forgot to CC the list:
>>>>> "Roel" == Roel van Dijk <vandijk.roel at gmail.com> writes:
Roel> I propose to make UTF-8 the only allowed encoding for Haskell
Roel> source files. Implementations must discard an initial Byte
Roel> Order Mark (BOM) if present [3].
Roel> * Pros - Ensures that Haskell source can be reliably exchanged
Roel> on the byte level. - Disallows implicit ISO-8859-* encodings
Roel> in source code, ensuring portability. - Little or no
Roel> implementation burden for compiler writers.
Having thought this over a bit more, I don't think it's a good idea.
Allowed? Allowed for what?
What does it achieve? Nothing, as far as I can see. Authors will still
be able to write their Haskell code in any encoding they like. And any
compiler can have a front-end script with an option to specify the
encoding used by source files, which simply uses iconv on the fly to
translate.
I think the real place to mandate UTF-8 would be for Hackage. That's
where it matters (an alternative design would be to add an encoding
field in the .cabal file, but I don't think this has much merit).
--
Colin Adams
Preston Lancashire
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
More information about the Haskell-prime
mailing list