Joaquin Cuenca Abela wrote:
> 
> --- Andrew Dunbar <[EMAIL PROTECTED]> wrote:
> >
> > Also the size() method is now ambiguous.  Does it
> > return the
> > number of characters or the number of bytes?
> > Shouldn't we
> > have two non-ambiguous methods in both the UT_String
> > and
> > UT_UCS2String?
> 
> I don't think so.  To me size() should return the
> number of "entries" in the string.  And here, the type
> of the "entries" are "char", or "wchar_t", or
> whatever.  So size should return the number of
> characters.

For a vector or an array I'd agree but a string is a
bit different.  I'll change my code to
write(pString->ucs_str(), pString->size * sizeof(UT_UCSChar));

Have you checked the corruptions problems by the way?

Andrew.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Reply via email to