Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2005-11-02 08:04:56


Gennadiy Rozental wrote:
>>The implementation I propose deals with unicode perfectly fine (storing
>>utf-8 internally),
>
>
> What if I prefer UCS4 or plain 8 bit?

Why would you care ? The API lets you plug in your own unicode string type,
so you can access the data and map it to whatever encoding you want.

Of course, the choice of the encoding used by the backend will have an
impact on performance and memory usage, and it would be nice if that could
be tuned by the user. Yet, that is an implementation detail. If we require
backends to *use* different encodings internally I'm afraid that will reduce
the choice a lot (I'm actually not aware of any implementation that gives
such a choice).

> And then I would be interested in concept this policy
> represent.

Have a look into the code !
I admit right now it's totally trivial, as it only provides functions
to convert in and out between the externally visible unicode type and
the type libxml2 uses ('xmlChar *'). There isn't even an explicit second
template parameter for it, as I deduce it from the first. If that proves
to be insufficient, I'll add it as an explicit second parameter to all
types.

Regards,
                Stefan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk