request for co-development: improving Data.CharEncoding module

Hello Haskell, i plan to publish new version of Streams library on next week (see http://haskell.org/haskellwiki/Library/Streams if you still don't know about it :) ). one of it's current drawbacks is lack of support for file encodings other than UTF-8 and Latin-1. if someone can work on this support, it will widen usage area of the library i attached to letter current version of this module. it uses monadic approach to encoding and decoding: each encoder is just a function that performs monadic PutChar action via calls to monadic PutByte action, and decoder in the same fashion translates each call to GetChar into calls to GetByte. this allows to use encoders in various environments - for monadic i/o, string conversion and so on this module requires two improvements - first, support for other UTF encodings; second, raising an exception in situations when data can't be encoded (such as char > '\255' for Latin-1) or decoded (bad UTF bytes sequence). if you are going to work on this module, please write about this here - to avoid overlapping of work -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On 5/26/06, Bulat Ziganshin
Hello Haskell,
i plan to publish new version of Streams library on next week (see http://haskell.org/haskellwiki/Library/Streams if you still don't know about it :) ). one of it's current drawbacks is lack of support for file encodings other than UTF-8 and Latin-1. if someone can work on this support, it will widen usage area of the library
i attached to letter current version of this module. it uses monadic approach to encoding and decoding: each encoder is just a function that performs monadic PutChar action via calls to monadic PutByte action, and decoder in the same fashion translates each call to GetChar into calls to GetByte. this allows to use encoders in various environments - for monadic i/o, string conversion and so on
this module requires two improvements - first, support for other UTF encodings; second, raising an exception in situations when data can't be encoded (such as char > '\255' for Latin-1) or decoded (bad UTF bytes sequence). if you are going to work on this module, please write about this here - to avoid overlapping of work
I wonder if it helps any to "steal" this code from Python and translate it into Haskell. /me goes back to lurking. -jj

Hello Shannon, Friday, May 26, 2006, 10:45:38 PM, you wrote:
about it :) ). one of it's current drawbacks is lack of support for file encodings other than UTF-8 and Latin-1. if someone can work on
I wonder if it helps any to "steal" this code from Python and translate it into Haskell.
no. the algorithm is not complex, it just need to be programmed according to scheme i described -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (2)
-
Bulat Ziganshin
-
Shannon -jj Behrens