Boost logo

Boost :

Subject: Re: [boost] [nowide] Easy Unicode For Windows: Request For Comments/Preliminary Review
From: Matus Chochlik (chochlik_at_[hidden])
Date: 2012-05-30 07:25:50


>>
>> 1) Let's use std::string as a encoding-agnostic string... [snip]
>>
>> 2) Let's implement a text storage class (and let's call it) text;
>> This class would store text ... [snip]
>>
>> [snip]
>> The encoding tags would specify both concrete encodings
>> like UTF-16 or ISO-8859-2, etc. and symbolic encodings
>> [snip]
>
> I want to stop this direction and discussion before it begins.

strange, but OK :)

>
> This library is not generic library to handle text in all encodings
> and handle all possible 3rd part libraries and convert between
> them, and this library is not intended to be so.

I know it is not. What I'm saying is that it could be. There are
lots of libraries that pick some subset of text handling, implement
some useful things and then stop. Which is a shame because
text handling su*ks in C++ and Boost is one of the platforms that
have the influence to finally improve things.

>
> The potential user of this library do not want to handle 101 encodings
> one wants to use ONE and SINGLE encoding all over its application
> and convert the strings to Wide encoding on Windows libraries boundaries and
> pass the UTF-8 string as is on Unix programs.

See above.

>
> Note: The developer that uses this library considers ANSI
>       API as broken and only Wide API is a valid API on
>       Windows.

You will get no arguments from me, I agree with you on this point.

>
> So no this library is not Boost.Text it is:
>
>  "I want to use UTF-8 in may application... and I want to use
>   only Wide API on Windows as the only correct API to use"
>

Which limits the usability of the library, because most (Windows
and Linux) applications that I worked on also used third party libraries
which sometimes have their own issues with encodings (similar to the
Windows API)

>>
>> If I'm not terribly mistaken all the code for conversions between
>> encodings already is part of Boost.Locale.
>>
>
> Yes and Boost.Nowide uses UTF-to-UTF conversion part (that is header only one
> in Boost.Locale)
>
>>
>> Then all the useful things like the nowide::args class and
>> the wrappers around iostreams, etc. could be implemented
>> on top of that.
>>
>
> The library does not reinvent the wheel :-),
> it uses boost::locale::utf... (which I BTW the author of it)
>
I never said that it reinvents the wheel (and I know that you are the
author of Boost.Locale, I wrote one of the reviews)

I certainly don't want to push you into something that you don't
want to do. You asked for opinions I just gave you mine.


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