[interfacekit] Re: MAJOR UTF8 bugs ...
- From: "Cedric Degea" <cdegea@xxxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Sun, 27 Jan 2002 12:36:19 +0100
>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
- References:
- [interfacekit] MAJOR UTF8 bugs ...
- From: Steve Vallée
Other related posts:
- » [interfacekit] MAJOR UTF8 bugs ...
- » [interfacekit] Re: MAJOR UTF8 bugs ...
- » [interfacekit] Re: MAJOR UTF8 bugs ...
- » [interfacekit] Re: MAJOR UTF8 bugs ...
- » [interfacekit] Re: MAJOR UTF8 bugs ...
- [interfacekit] MAJOR UTF8 bugs ...
- From: Steve Vallée