[Haskell-cafe] Writing binary files?

Glynn Clements glynn.clements at virgin.net
Sun Sep 12 10:58:07 EDT 2004


Sven Panne wrote:

> > Also, changing the existing functions to deal with encodings is likely
> > to break a lot of things (i.e. anything which reads or writes data
> > which is in neither UTF-8 nor the locale-specified encoding).
> 
> Hmmm, the Unicode tables start with ISO-Latin-1, so what would exactly break
> when we stipulate that the standard encoding for string I/O in Haskell is
> ISO-Latin-1?

That would essentially be formally specifying the existing behaviour,
which wouldn't break anything, including the mechanism for
reading/writing binary data which I suggested (and which is the only
choice if your Haskell implementation doesn't have h{Get,Put}Buf).

The problems would come if it was decided to change the existing
behaviour, i.e. use something other than Latin1.

-- 
Glynn Clements <glynn.clements at virgin.net>


More information about the Haskell-Cafe mailing list