The SJIS/JIS encoding is applied to the whole line that is sent to the server. When a line is received from the server, again the decoding is applied to the whole line.
I could change it so that it works like the UTF-8 implemention...
For UTF-8, mIRC extracts the target channel/query and the :message portion from PRIVMSG, NOTICE, PART, TOPIC message that is about to be sent, and encodes the :message based on the UTF-8 setting for the target channel/query. Also, if the server's numeric 005 token CHARSET=UTF-8 is set, mIRC applies UTF-8 encoding and decoding to the whole line.
The question is, are there Japanese servers that require whole line sjis/jis conversion? If there are, the above solution will break mIRC on these servers, unless they support a numeric 005 CHARSET=JIS or some similar value that would tell mIRC to perform whole line conversion.
And should mIRC be SJIS/JIS converting non-message lines as well? ie. channel or query names in JOIN, MODE, etc. events? I seem to remember seeing Japanese channel names that looked like they were in JIS format long before I added SJIS/JIS support to mIRC. If that's the case, the selective UTF-8 encoding method above won't work for SJIS/JIS.