Re: CVS: commit hub abi/src/af/util/xp ut_string_class.cpp ut_string_class.h ut_stringbuf.cpp ut_stringbuf.h

From: Hubert Figuiere <hfiguiere_at_teaser.fr>
Date: Tue Jan 16 2007 - 16:53:36 CET

Robert Staudinger wrote:

> what I'm wondering about the std:.string migration is, won't we be
> running into similar issues as with UT_String vs. UT_UTF8String? I
> seem to remember some time ago, maybe 1-2 years we've been talking
> about migrating /to/ UT_UTF8String.
> Or does the migration only concern UT_String -> std::string?

Everywhere we use UT_String we can use std::string
Everywhere we use UT_UCS4String we can use std::basic_string<UCS4Char>
std::basic_string<> is implemented as copy on write which is very helpful.

UT_UTF8String is a different beast. Ideally it could be just a
std::string but we need access to multibyte chars. Glibmm implements a
Glib::ustring which is like std::string but for UTF8. It is NOT a
subclass it just have the same interface and converters, to be used in STL.

I have yet to think of the right transition, but clearly having these
converters is already helpful.

Hub
Received on Tue Jan 16 16:53:53 2007

This archive was generated by hypermail 2.1.8 : Tue Jan 16 2007 - 16:53:54 CET