mIRC Home    About    Download    Register    News    Help

Print Thread
UTF8 bug: Writing long messages/pasting text #143013 20/02/06 10:10 PM
Joined: Feb 2006
Posts: 1
Y
Yggdrasil Offline OP
Mostly harmless
OP Offline
Mostly harmless
Y
Joined: Feb 2006
Posts: 1
The following bug occurs, when a long UTF8 message is either typed or pasted an being send to the server: The text becomes mutilated. For example a "J" stays as a "J" but special non-ASCII Charavters will become a "?" or something else.
The limit seems to be 316 characters, but I did only a short test.

Re: UTF8 bug: Writing long messages/pasting text #143014 22/02/06 10:43 PM
Joined: Dec 2002
Posts: 4,830
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,830
IRC servers place their own limit on the allowed length of a message. Usually the maximum length of the whole server message is around 512 characters, which includes the PRIVMSG, the user's nickname, and so on. So the maximum length of the actual text you're trying to send will vary depending on who you're sending to, the users nickname, your nickname, etc.

Since encoded UTF-8 is longer than plain text, this means that your maximum allowed message length will depend on the final encoding of the UTF-8 text, as well as the above-mentioned issues.

Basically, the UTF-8 will end up scrambled if you're message is too long. As far as I can tell there is no way around that other that other than to set an arbitrarily small limit on the length of your message in the editbox.

Also, mIRC checks a line to see if it contains valid UTF-8 sequences. If it finds anything in the line that is not UTF-8 or invalid UTF-8, it assumes that the line is plain text, or some other type of encoding, and does not perform any UTF-8 parsing on it.