On Sun, 27 Jul 2003 15:40:34 -0700 PDT "Andrew Bachmann" < andrewbachmann@xxxxxxxxx> wrote: > - CharacterSet news > > Thanks to Axel and Ingo for their advice on restructuring the > CharacterSet and > CharacterSetRoster. I did as we discussed and created a new library > libtextencoding.so. It's built > from the sources in src/kits/support. It does have convert_to_utf8 > and convert_from_utf8 > functions but they are currently simply stubs. In addition to those, > it has BCharacterSet and > BCharacterSetRoster which are defined in the BPrivate namespace. > > BCharacterSet is very similar to my earlier proposal, except that it > now has a CountAliases() > function and a AliasAt(uint32 index) function. It also has two new > constructors, a default > constructor, and a constructor providing all the fields. The class > is doxygen documented in the > header, which is at private/support/CharacterSet.h. > > BCharacterSetRoster is a bit different from before. I followed > Ingo's advice and made it a > lightweight stateful object. (one int) It performs iterator through > the functions > GetNextCharacterSet(BCharacterSet * charset) and > RewindCharacterSets(). I rewrote > StyledEdit to use these iterators. Just one small remark: GetNextCharacterSet() should maybe better return B_ENTRY_NOT_FOUND instead of B_BAD_VALUE, when the end has been reached. CU, Ingo