patch applied (packages/base): Strip any Byte Order Mark (BOM) from the front of decoded streams.

Simon Marlow marlowsd at gmail.com
Thu Oct 1 04:01:45 EDT 2009


On 01/10/2009 02:39, Ben Lippmeier wrote:
> Wed Sep 30 01:42:29 PDT 2009  Ben.Lippmeier at anu.edu.au
>    * Strip any Byte Order Mark (BOM) from the front of decoded streams.
>    Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445
>    When decoding to UTF-32, Solaris iconv inserts a BOM at the front
>    of the stream, but Linux iconv doesn't.

Thanks for looking at this, but I think we should do it a different way. 
  It may be that Solaris thinks we want UTF-32 rather than UTF-32BE, 
which is why it is adding the BOM: try changing haskellChar in 
GHC.IO.Encoding.IConv.  It currently uses UCS-4(LE), but it should 
probably use UTF32{BE,LE}.

If that doesn't fix it, then I think we should apply any workarounds in 
GHC.IO.Encoding.Iconv, perhaps with a configure test to detect the 
erroneous behaviour.

Cheers,
	Simon


More information about the Cvs-libraries mailing list