[interfacekit] MAJOR UTF8 bugs ...

Ok, I don't want to annoye everybody with the same question but ...

I'm currently working on the BString class.  And on R5 this class is filled
with MAJORS bugs about UTF-8 encoded strings. Nothing's wrong when using
straight ASCII string, but BeOS use natively UTF8, and BString is just plain
buggy about those.  This is not like a wrong error message in only one
function that I can reproduce for R1 sake, but a very important issue
plagued all over the BString implementation.

I know I can use simple #ifdef and produce 2 codes for each functions. But
exactly because of the tremendous size of BString class, I'm not very fond
to double-job each single methods implementations.

My opinion is: because of those many bugs, I'm 100% sure nobody ever used
this class in the context of a localized program. It just make not sense at
all.

Here's a simple example of what I mean :

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

will produce ...  "Steve Vallé"    (without the final "e", because gthe "é"
require 2 bytes)

I personnaly remember when I developed a syntax coloring editor for BeOS, I
got so many bugs because of the BString that I litterally re-made my own
string class for that project.

What's your opinions on that issue ?
thanks
Steve



Other related posts: