H98 Text IO
david at loisch.de
Tue Feb 26 17:40:28 EST 2008
> I really mean that it'd
> be nice if hugs, ghc, jhcm nhc98 etc could agree for each of the major
> platforms, Linux/Unix, OS X and Windows. And I don't mean necessarily
> that they should do the same thing across platforms (eg as I understand
> it OS X would always use UTF8 not a variable locale) just that they
> should do the same on the same platform.
That's exactly what I (an employee developing commercially used Haskell
applications) would like to see. Java does the same thing and it always
works as expected and that's always best.
Java has a platform default encoding which is not fixed (on Linux it's
dependent on the current locale as set by the LC_CTYPE, LC_ALL or LANG
environment variables) but is determined in a way consistent with the
platform. The platform default encoding is only used if no other encoding
is explicitly given. In general when considering industrial adoption it's
probably always a good idea to have a look at Java. We've never had
(real) problems with Java programs, but lots of problems with Python,
Haskell and Ocaml.
If I write simple program just printing a non-ASCII string to the terminal
or to a file I'd expect that I can read it on the screen or using my
favorite text editor without having change anything -- neither in my
terminal nor in my program. When I run the program on my platform don't
mind if somebody else might get differently encoded output from the same
program as long as I get what I expect. If I as a programmer really want
to make sure that everybody gets the same output I can make sure a
specific encoding is used.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/libraries/attachments/20080226/32d8911f/attachment.bin
More information about the Libraries