From: Chris J. F. <Dar...@ph...> - 2003-09-27 06:46:53
|
I don't know if this is client specific, but has anyone noticed that the message size for IRC is quite a bit smaller than that of the rest of the protocols supported, resulting in a cropping of lengty messages? Chris |
From: Nathan P. <po...@co...> - 2003-09-27 17:06:28
|
Thus spake Chris J. Friesen: > I don't know if this is client specific, but has anyone noticed that > the message size for IRC is quite a bit smaller than that of the rest > of the protocols supported, resulting in a cropping of lengty > messages? Is it cutting them off at 510 characters? If so, that's just following the protocol: http://www.irchelp.org/irchelp/rfc/chapter2.html#c2_3 --=20 Nathan Poznick <po...@co...> I've heard that the government wants to put a tax on the mathematically ignorant. Funny, I thought that's what the lottery was! -- Gallagher |
From: Mark D. <ma...@ki...> - 2003-09-27 17:18:51
|
The message size is a limit imposed by the IRC server you are using, not by Gaim. This is true for most (if not all) protocols that Gaims supports. The old IRC code used to break up the message into small, baby messages, but the new IRC code does not do this yet. Someone just needs to bake Ethan some gooey brownies and we'll be set. -Mark On Fri, 26 Sep 2003 23:31:12 -0400, Chris J. Friesen wrote > I don't know if this is client specific, but has anyone noticed that > the message size for IRC is quite a bit smaller than that of the > rest of the protocols supported, resulting in a cropping of lengty messages? > > Chris -- O O Mark Doliner \ | ma...@ki... \ | www.kingant.net "There needs to be a better word for weird." |
From: Ethan B. <ebl...@cs...> - 2003-09-27 18:02:10
|
Chris J. Friesen spake unto us the following wisdom: > I don't know if this is client specific, but has anyone noticed > that the message size for IRC is quite a bit smaller than that of > the rest of the protocols supported, resulting in a cropping of > lengty messages? IRC servers are not required to pass messages of more than 512 characters, including routing and termination ... which leaves somewhere in the neighborhood of 450 characters that a client may send without truncation. I had put some code into the old IRC protocol to handle long messages, but it was lost in the rewrite. The "appropriate" thing to do would be for gaim to bust up long messages into several shorter messages. I will eventually reimplement this, but doing it correctly with respect to international characters is somewhat difficult. Ethan --=20 To surrender one's personal weapon is to invite disaster. This has been obvious for so long and so often that there is probably a Greek word for the practice. -- Jeff Cooper |
From: Evan M. <ma...@da...> - 2003-09-28 21:10:21
|
On Sat, 2003-09-27 at 10:39, Ethan Blanton wrote: > The > "appropriate" thing to do would be for gaim to bust up long messages > into several shorter messages. I will eventually reimplement this, > but doing it correctly with respect to international characters is > somewhat difficult. Does IRC even support international characters? If the limit is number of characters (as opposed to bytes), it would seem g_utf8_strncpy() could do the trick. Otherwise, it gets pretty ugly. And I guess if you want to split on word boundaries it does become a bit more complicated... hm. If you take it to its extreme conclusion it's unsolvable because of languages like Thai, which lacks spaces but also don't allow breaks in the middle of words. But somehow I think this is thinking about the problem too hard. :) --evan, the language geek -- Evan Martin ma...@da... http://neugierig.org |
From: Ethan B. <ebl...@cs...> - 2003-09-29 19:57:22
|
Evan Martin spake unto us the following wisdom: > On Sat, 2003-09-27 at 10:39, Ethan Blanton wrote: > > The "appropriate" thing to do would be for gaim to bust up long > > messages into several shorter messages. I will eventually > > reimplement this, but doing it correctly with respect to > > international characters is somewhat difficult. >=20 > Does IRC even support international characters? Yes, although not very intelligently. Assuming you know what character set the other user is sending, you may use a non-ASCII character set. All but the oldest IRC servers are now 8-bit clean (and, in fact, while the specification is somewhat ambiguous if I recall correctly, it seems to indicate that they should be), so providing you follow the _other_ rules correctly (limitations in characters allowed for various tokens such as hostnames) you may use a convenient character set. > If the limit is number of characters (as opposed to bytes), it would > seem g_utf8_strncpy() could do the trick. Otherwise, it gets pretty > ugly. Why would it be the number of logical characters? This requires the server to know every character set which might be used, and furthermore seems to miss the point of fixed limits ... the point is that the server may allocate a 512-byte buffer and be certain that any message it is intended to pass will fit in it -- if it doesn't, the server is free to truncate it. Yes, it does get ugly. The "best" reliable method I can come up with is to convert to the desired character set, truncate, convert back to UTF-8 with slop truncation, determine what part of the string was successfully converted and pinned into the space available, send that, and repeat on the remaining string. It's just not worth it. I will probably enforce the length of the UTF-8 string, and assume that localized strings are <=3D the length of the UTF-8 string ... which may be invalid, but should work in many (if not most) encodings. (note that certain situations (e.g. ASCII text encoded into UTF-16) are guaranteed to fail) > And I guess if you want to split on word boundaries it does become a bit > more complicated... hm. If you take it to its extreme conclusion it's > unsolvable because of languages like Thai, which lacks spaces but also > don't allow breaks in the middle of words. But somehow I think this is > thinking about the problem too hard. :) Many languages fall into that category... Any breaking done will be on a (hopefully logical) character level, not word boundaries. Ethan --=20 To surrender one's personal weapon is to invite disaster. This has been obvious for so long and so often that there is probably a Greek word for the practice. -- Jeff Cooper |
From: Matthew S. <mat...@ze...> - 2003-09-29 21:59:33
|
On Sun, Sep 28, 2003 at 01:18:15PM -0700, Evan Martin wrote: > On Sat, 2003-09-27 at 10:39, Ethan Blanton wrote: > > The > > "appropriate" thing to do would be for gaim to bust up long messages > > into several shorter messages. I will eventually reimplement this, > > but doing it correctly with respect to international characters is > > somewhat difficult. > > Does IRC even support international characters? Nope. > If the limit is number of characters (as opposed to bytes), it would Alas, no such luck... What does Gaim do when the user tries to send a too-long message in one of the other protocols? Duplicating that behavior would make things consistant, at least. |