Is it possible to get there unicode support? Right now on IdIRC1PrivateMessage i have '?' Thanks for help.
procedure TForm1.IdIRC1PrivateMessage(ASender : TIdContext;
const ANicknameFrom, AHost, ANicknameTo, AMessage : unicodestring);
begin
Memo1.Lines.Add(TimeToStr(Time) + ': ' + ANicknameFrom + ': ' + AMessage);
end;
Indy version: 10.5.8.0. When i will send message in mIRC eg 'żźć' i will get "???" in delphi
The IRC protocol itself does not provide any provisions for Unicode. mIRC implements Unicode by using UTF-8 where applicable (see this article).
TIdIRC
does not natively support Unicode. However, you can manually tell TIdIRC
to encode/decode data using UTF-8 by setting the TIdIOHandler.DefStringEncoding
property to IndyUTF8Encoding
after connecting, or by setting the global IdGlobal.GIdDefaultTextEncoding
variable to encUTF8
(it is set to encASCII
by default). I make no guarantee that it will work correctly in all situations though (particularly during CTC/DCC operations).