[text] Comparison with Unicode features of Boost.Locale

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[text] Comparison with Unicode features of Boost.Locale

Boost - Dev mailing list
Dear Zach & others,

Boost already has some Unicode functionality in Boost.Locale.
Would you like to compare the pros/cons of each?


Regards, Phil.





_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [text] Comparison with Unicode features of Boost.Locale

Boost - Dev mailing list
On Tue, Jun 16, 2020 at 1:22 PM Phil Endecott via Boost
<[hidden email]> wrote:
>
> Dear Zach & others,
>
> Boost already has some Unicode functionality in Boost.Locale.
> Would you like to compare the pros/cons of each?


Sure.  I was about to reply that they are unrelated, and that's mostly
true.  However, looking again at Boost.Locale, I see that I forgot
that it does do some of the same things.

Boost.Locale is concerned with the locale system from C, the
iostreams-related locale stuff, and iostreams themselves.  All that is
completely unrelated to what Boost.Text does, which is: strings and
ropes (though the strings are probably going away after the review),
all the named Unicode algorithms, and text (string-like types that
maintain Unicode invariants).

What they do have in common is case conversion, Unicode normalization,
collation, and text segmentation (word breaks, etc.).  So, there is
some overlap, but not a lot, when you consider the feature sets of the
respective libraries.

Where they do overlap, here are the differences:

Locale uses ICU directly, so there is an ICU dependency.
Locale's (read: ICU's) collation is faster than Text's.  Text is
faster at everything else.
Locale seems to be based around char and wchar_t.  Text is fully generic.

Again, that only represents a somewhat small part of either library.
There is not that much overlap.

Zach

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [text] Comparison with Unicode features of Boost.Locale

Boost - Dev mailing list
>
>
>
> Locale uses ICU directly, so there is an ICU dependency.
> Locale's (read: ICU's) collation is faster than Text's.  Text is
> faster at everything else.
> Locale seems to be based around char and wchar_t.  Text is fully generic.
>
>
>
> Can we use text to remove ICU dependency?

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [text] Comparison with Unicode features of Boost.Locale

Boost - Dev mailing list
On Wed, Jun 17, 2020 at 5:44 PM Damian Vicino <[hidden email]> wrote:

>>
>>
>>
>> Locale uses ICU directly, so there is an ICU dependency.
>> Locale's (read: ICU's) collation is faster than Text's.  Text is
>> faster at everything else.
>> Locale seems to be based around char and wchar_t.  Text is fully generic.
>>
>>
>>
> Can we use text to remove ICU dependency?

Unfortunately, no.  All that stuff that Boost.Text does not do, like
monetary formatting and parsing, will still need ICU to function.
However, Boost.Text can be used to replace the 3 different
implementations of UTF transcoding in Boost, if the individual authors
are interested. :)

Zach

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost