[Haskell-cafe] Re: PROPOSAL: New efficient Unicode string library.
Twan van Laarhoven
twanvl at gmail.com
Tue Oct 2 18:01:50 EDT 2007
Lots of people wrote:
> I want a UTF-8 bikeshed!
> No, I want a UTF-16 bikeshed!
What the heck does it matter what encoding the library uses internally?
I expect the interface to be something like (from my own CompactString
library):
> fromByteString :: Encoding -> ByteString -> UnicodeString
> toByteString :: Encoding -> UnicodeString -> ByteString
The only matter is efficiency for a particular encoding.
I would suggest that we get a working library first. Either UTF-8 or
UTF-16 will do, as long as it works.
Even better would be to implement both (and perhaps more encodings), and
then benchmark them to get a sensible default. Then the choice can be
made available to the user as well, in case someone has specifix needs.
But again: get it working first!
Twan
More information about the Haskell-Cafe
mailing list