[interfacekit] Re: MAJOR UTF8 bugs ...

>BString  string1 = "Steve "; 
>BString  string2 = "Vallée";   // Note the "é" character 
>string1.Append( string2, 6 ); 
>

The second argument to append is in bytes, no glyphes.

Use this instead:
        int32                           CountChars() const;
                                                /* returns number of UTF8 
characters in string */

Like thus

string1.Append( string2, string1.CountChars() );
And it should be ok.

There might be a newsletter article on the matter IIRC.

HTH,
cd.

--
http://cdegea.free.fr/ | BeDev E-16870
"One thing to rule them all" -- UserFriendly.org, 20011021



Other related posts: