Hello,

looks like you have a 8-byte character input routines in mIRC, this prevents from proper handling Russian w/UTF8 - with 8byte input all russian characters are above value of 128. In result, no russian text is being sent at all, when there's only russian with no spaces, mIRC complains that "no text to send".

Steps to reproduce:
1. Configure Windows -- Control Panel -> Regional and Language settings -> Location: Russia -> Standards: Russia -> Advanced tab -> Language for non-Unicode programs: Russian -> Optionally, if you want, apply to default user profile.
2. Configure Input -- Control Panel -> Regional and Language settings -> Languages tab -> Details -> Add -> Input Language: Russian -> Input layout: Russian.
3. Connect mIRC 6.21 to UTF8-enabled server, join a channel.
4. Press left Alt+Shift simultaneusly, then press keyboard buttons in this order "C]tim to` 'nb[ vzurb[ ahfyweprb[ ,ekjxtr? lf dsgtq xf./" If configured properly, that will lead to this text:


The text that will be received at the other end of the wire will be " , ." -- All Russian letters are wiped out completely.

-------

As a coder, my guess is that you're trying to convert 8-byte text into UTF8 using hard-coded routines by your own. The problem is -- you don't know which codepage that 8-byte text is encoded for sure unless you ask OS to provide that along the text.

Better way to solve this is to use wide characters instead of 8-byte ones, then you can just call platform SDK's WideCharToMultiByte() with first parameter set to CP_UTF8. You can also instead of calling that function implement your own UCS2->UTF8. This routine doesn't depend on OS's codepage completely.

Last edited by HMage; 13/02/07 07:51 PM.