Boost logo

Boost :

Subject: Re: [boost] [gsoc] Request Feedback for Boost.Ustr Unicode String
From: Matus Chochlik (chochlik_at_[hidden])
Date: 2011-08-16 01:50:25


On Tue, Aug 16, 2011 at 5:11 AM, Joe Mucchiello <jmucchiello_at_[hidden]> wrote:
>>> text t6(pq_some_func(), textenc::libpq());
>>>
>> You don't need it. You're proposing a design that tries to solve a
>> non-existing problem. There is no such diversity of encodings in the
>> interfaces. I don't know what is libpq, but it either uses UTF-8 in which
>> case you write:
>>
>> string t6 = pq_some_func();
>>
> I think the point here that you don't need to know the encoding of libpq.
> If the policy is that you use this text class and that to use it you
> convert it using the standard text constructor that takes the listed tag.
>
> For libraries that use UTF-8 the conversion is a no-op. Adapting a new
> library to the "boost way" just involves adding a new tag to the textenc
> namespace and, if necessary, writing a new pair conversion routines.
>

Exactly.


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