The current IRC specification recommends UTF-8: https://modern.ircdocs.horse/#client-to-server-protocol-stru...
It is also possible for servers to tell clients only UTF-8 is allowed: https://ircv3.net/specs/extensions/utf8-only . This is the default of some server implementations.