RE: [bme-develop] Code imported into CVS
Status: Planning
Brought to you by:
sirmik
|
From: Daniel G. <al7...@ma...> - 2004-03-27 14:56:17
|
Hello. I found a few problem with some of the changes.
The problem lays in that the MSN protocol uses the charset=3DUTF8 and so=20
does BeOS for all the GUI text displaying classes. The problem is that=20
BString cannot handle UTF8. So when you get the message body like this:
BString im;
message->FindString("body",&im);
you get some problems for most of other non ascii characters, for=20
example =E1,=E9,=ED,=F3,=FA, =F1 (If you don't see this character change =
the=20
encoding of the e-mail to Latin-1). I use these chars a lot since most=20
of my conversations are in spanish. I think the best way to handle=20
messages is to use char pointers instead of BStrings, to avoid any=20
problems with character encodings.=20
On a separate note, some suggetions for changes
Maybe move the "\r\n" replacing code to the MsnSBHandler to make the=20
MsnChatter easier, clearer more straight forward, doing all the hard=20
work in the Protocol classes.
Change the color in messages from this
rgb_color rgb =3D rgb_color();
msg.AddInt8("red",rgb.red);
msg.AddInt8("green",rgb.green);
msg.AddInt8("blue",rgb.blue);
into this:
rgb_color rgb =3D rgb_color();
msg.AddData("color",B_RGB_COLOR_TYPE,(const void*)&
rgb,sizeof(rgb));
...
const rgb_color *rgb; ssize_t sz_color;
message->FindData("color",B_RGB_COLOR_TYPE,(const void**)&rgb,&
sz_color);=20
Create two methods in common.cpp
char * getDateStr(char *str, const char *format, int size);
char * getTimeStr(char *str, const char *format, int size);
What do tou guys think?
|