[Haskell-cafe] Unicode Haskell source -- Yippie!
cma at bitemyapp.com
Fri Apr 25 08:37:42 UTC 2014
On Fri, Apr 25, 2014 at 3:24 AM, Travis Cardwell <
travis.cardwell at extellisys.com> wrote:
> On 2014年04月25日 16:25, Christopher Allen wrote:
> > I'm going to disagree for a different reason. The transition to Python 3
> > improved unicode support in some respects, but utterly gutted the
> > previously excellent codec support. Now you can't really handle arbitrary
> > source/destination encodings of text without treating everything as if
> > were bytes. Really bad.
> Perhaps I am misunderstanding, but, from my experience, Python 3 still has
> excellent codec support:
> When reading from a file, the source encoding can be passed to the `open`
> function so that it handles transcoding for you. When writing to a file,
> the destination encoding can similarly be specified to `open`. When
> dealing with other sources/destinations, data must be read/written as
> bytes, but content can be encoded/decoded as necessary using the functions
> in the codecs module.
> Haskell has excellent codec support thanks to ICU:
> The contents of the `Data.Text.ICU.Convert` module can be used to convert
> between codecs. For reference, here is a list of supported codecs:
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe