[Haskell-i18n] SourceForge Project Active

Sven Moritz Hallberg pesco@gmx.de
03 Sep 2002 12:05:54 +0200


--=-9qzcqwtlye1EMGdAVJlM
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Tue, 2002-09-03 at 10:46, Martin Norb=E4ck wrote:
> My quickCheck tests found errors in three and four byte encodings:
>=20
> *Text.Encoding.TestUTF8> encodeOne (toEnum 51177)
> [236,159,140]
> *Text.Encoding.TestUTF8> decodeOne [236,159,140]
> (Right '\51148',3,[])
> *Text.Encoding.TestUTF8> encodeOne (toEnum 845466)
> [243,206,154,154]
> *Text.Encoding.TestUTF8> decodeOne [243,206,154,154]
> (Left (InvalidLaterByte 1),1,[206,154,154])
>=20
> 51177 should encode into [236,159,169]
> 845466 should encode into [243,142,154,154]

Fixed. All three properties seem to be satisfied in GHCi now. Beware of
prop_DecEnc, though, quickCheck erroneously claims to falsify it. I
guess this is caused by a bug in GHC 5.04's handling of strings that hit
the list some time ago (try "\666"=3D=3D['\666']). Manually applying
prop_DecEnc to the alleged counter example has always yielded True for
me.


Regards,
Sven Moritz

--=-9qzcqwtlye1EMGdAVJlM
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA9dImCBz8tX8KX/qsRAhDQAKCUuHUvuRVHGsq2Fl2PDas+QRo6jgCglMVs
ClTmO0LudbIDNzIjYe00nko=
=vPmU
-----END PGP SIGNATURE-----

--=-9qzcqwtlye1EMGdAVJlM--