[openbeos] Re: BString

  • From: "Earl Colby Pottinger" <earlcp@xxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 13 Nov 2001 07:53:11 EST


>>Where in the BeBook does it say BStrings are for text only?
>>If it is for text only, how will it handle UNICODE without zeros?
>
>To quote The Book:
>
>"Currently, BString only supports assignment and retrieval of strings 
>that contain single-byte characters. If you want to use BString to store 
>a string that contains multi-byte (UTF8) characters, you have to flatten 
>the string yourself and adjust the character count arguments 
>accordingly."
>
>Data is not information, and information is not knowledge: knowledge is 
>not understanding, and understanding is not wisdom.
>       - Philip Adams

To make matter worse for me.  After all my mouthing off about BStrings being 
broken I now find that I can not duplicate the error I got when writing 
SerialTransfer!  At the time appending strings containing nulls and pasting 
strings to functions while the string contained nulls cause the lenght of the 
string to be truncated!  Now in my test code everything works fine.

Check out http://webhome.idirect.com/~earlcp/Downloads/TestBString.zip

             Earl Colby Pottinger

AAARRRHHHH!!!! Why does it work now?  I was so upset before that I wiped out 
all my old code and started from scratch.  Now I can't find out why it failed 
and this works.

Other related posts: