
On Fri, Mar 9, 2012 at 1:40 PM, Joachim Breitner
Hi Sönke,
Am Freitag, den 09.03.2012, 11:17 +0100 schrieb Sönke Hahn:
Any comments welcome.
you could elaborate the documenatation “Assumes UTF-8” – I guess this only applies to the two ByteString variants, as String and Text _should_ contain unicode codepoints and no encoding. Not that someone tries to use a String where each Char corresponds to a byte in a UTF-8 encoded string and thinks he can convert it correctly.
I was about to suggest to merge this into the convertible package (to fight package proliferation), but found that it seems it is already there: http://hackage.haskell.org/packages/archive/convertible-text/0.4.0.2/doc/htm...
Greetings, Joachim
-- Joachim "nomeata" Breitner mail@joachim-breitner.de | nomeata@debian.org | GPG: 0x4743206C xmpp: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
I'm the author of convertible-text, and I consider it deprecated (it's marked as such in the synopsis). As far as string-conversions, I'm a little concerned that it's using decodeUtf8, which can throw exceptions from pure code for invalid UTF8 sequences. I would prefer decodeUtf8With lenientDecode. Actually, my *real* preference would be that a lenient decode was the default so that we aren't exposing a partial function as the default way to decode bytes. Michael