Hmmm, if I'm right Unicode can have null bytes in some chars, so Unicode strings should be terminated by a double '\0', shouldn't they ? my 0.02 Euros before going to bed, François. En réponse à Earl Colby Pottinger <earlcp@xxxxxxxxxxx>: > > > >Just quickie, I am writing a version of BString, just to cut my teeth, > > >any objections/suggestions? > > Keith > > Sorry I have not posted back earlier. I believe that BStrings as it > presently exists in BeOS is broken. The reason, it treats it's strings > like 'C' strings in some cases using a zero byte to make the end of the > string and at other times using the Length() function to tell it the > string length to control string functions. > > I believe that BStrings should always use the Length() function and thus > allow bytes containing zeros(0) to exist inside a string. > > Also note: If you read the BeBook BString section that there is no > mention that BStrings are zero terminated, only that the String() > function will return a zero terminated string. > > Earl Colby Pottinger > > PS. I am working a small test program to show what I mean, I will post > the code as soon as possible. > > >