mIRC Home    About    Download    Register    News    Help

Print Thread
#265168 13/03/19 11:30 PM
Joined: Nov 2017
Posts: 19
G
Pikka bird
OP Offline
Pikka bird
G
Joined: Nov 2017
Posts: 19
Hi Everyone,

I hope this is the correct forum. I'm somewhat confused by unicode support in mirc. Reading the web states that mirc has implemented unicode as utf16, however there is an option for utf8 messages.

Also, the DLL interface passes data over as a char *, casting this pointer to an unsigned char * seems to yield the correct results as far as utf8 is concerned.

So, is the char * pointing to a chunk of memory as utf16 or utf8?

Please help, this old developer is confused.

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
In Windows, applications can be compiled as single-byte ANSI or multi-byte Unicode. mIRC was originally an ANSI application. It was converted to Unicode. That is what is meant by Unicode in this context. Unicode in Windows applications is UTF-16.

Quote:
however there is an option for utf8 messages

This option is present because some users requested the ability to disable Unicode/UTF-8 conversion in incoming/outgoing messages.

Quote:
DLL interface passes data over as a char *

DLL support was added long ago. It supports char* for backwards compatibility. When a DLL is called, mIRC automatically converts parameters/results to/from Unicode/UTF-8.

Joined: Nov 2017
Posts: 19
G
Pikka bird
OP Offline
Pikka bird
G
Joined: Nov 2017
Posts: 19
Thanks so much Khaled, that makes perfect sense. In the mean time I have my code working and can now detect the Unicode script(s) in a message and can finally kill those pesky multi Unicode script spammers.

Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
A bit late, but for future readers, you can find useful informations/examples and more in depth explanation of how to make a dll for mIRC here: https://en.wikichip.org/wiki/mirc/dynamic-link_library


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard