UTF-8 and some issues...
Stéphane Bisinger <metal_kj-/[email protected]>
| Newsgroups | gmane.network.centericq |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I am trying to see how hard it could be to make
centericq working with utf-8. For now I am trying to
understand the code and there are a couple of issues
that you could help me to figure out...
The first one, and the one who made me write to you,
is that I cannot find the source code for the function
strpbrk();. It is only available in
kkstrtext-0.1/libkkstrtext.a, but not in any c/c++
file... How is that??? I am quite sure that there will
be something to change there too...
Apart from that I could see a couple of things that,
IMHO, could be improved. First of all, in some classes
I have seen something like this:
class centericq {
public:
blah blah;
protected:
blah blah;
public:
blah blah;
}
That public coming up twice looks strange to me...
Since I am no C++ expert, is that a programming
convention, or simply for some strange "evolution" the
class ended up this way?
In the latter case, I will correct these as soon as I
discover them.
Another thing is that there are quite some malloc,
strdup and others which are not checked for failures,
which should be done even if it may be unlikely. (BTW
isn't it better to use strndup & C.?)
And the last thing that I could see is that the code
for reading input characters on a single line is
handled in kkconsui/src/textinput.cc, while the code
for reading from the chat window is in
kkconsui/src/texteditor.cc . These two codes (I'm
referring in particulat to the switch statements) look
very similar and I think that it could be possible to
unify them in a single function, with all the benefits
we could get from reduced code size...
I hope that someone can help me with these questions,
the "missing" strpbrk() has stopped my work for now...
If anyone has other suggestions on this, please, tell
me, I'm glad to receive any kind of help. Oh I already
read about the C++ utf8 string library, maybe I'll use
it, maybe not... much string handling is done with
character pointers, so I use C library functions for
these...
Thank you,
Stéphane
Stéphane
___________________________________________________________
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
_______________________________________________
Cicq mailing list
Cicq-xGejAJT2w6wWP6gT/[email protected]
http://mailman.linuxpl.org/mailman/listinfo/cicq
Questions? Check the FAQ first: http://centericq.de/faq/