This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libstc++-v3 basic_string & multibyte strings



I would really like to have efficient multibyte support for
basic_string.
Simple methods like :

    mblen, mbtowc etc

Or a character iterator e.g.

template < yadda > class string_utf8 : public basic_string< yadda > {

    inline Character_Iterator Character_begin()
    {
        .... generate a character iterator ...

Character_iterator would be able to do things like read_char which
would convert a utf-8 character to a ucs-4 character and move the
pointer approprite bits.
    }

    // convert to utf 16
    inline operator string_utf16()
    {
        ... Do a conversion to utf-16 ...
    }

    // convert to ucs_4
    inline operator string_ucs4()
    {
        ... Do a conversion to UCS 4
    }

};

You get the drift.  There would be classes that supported using the
local mbstowcs etc as well as hard coded unicode conversions.

Anyone done anything in this area ?

Any interest ?

Any suggestions to achieve blinding performance ?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]