On Thu, Apr 25, 2013 at 8:57 AM, Stephen J. Turnbull <stephen at xemacs.org> wrote: > I think that would be an unfortunate result. These operations on > streams are theoretically nicely composable. It would be nice if > practice reflected that by having a uniform API for all of these > operations (charset translation, encoded text to internal, content > transfer encoding, compression ...). I think it would be useful, too, > though I can't prove that. But the translation to and from Unicode to some 8-bit encoding is different from the others. It makes sense that they have a different API. If you have a Unicode string you can go: Unicode text -> UTF8 -> ZIP -> BASE64. Or you can go Unicode text -> UTF8 -> BASE64 -> ZIP Although admittedly that makes much less sense. :-) But you can not go: Unicode text -> BASE64 -> ZIP -> UTF8 The str/bytes encoding/decoding is not like the others. //Lennart
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4