Hello! That's not a bug; the $chr(160) is not a valid utf-8 sequence but still a character with an ascii value above 127 - and as a result mIRC assumes that the whole line isn't utf-8 encoded and doesn't decode the rest either. If you want utf-8 to work, make sure not to use any ascii characters above 127 that aren't utf-8 sequences. You can do that by encoding these characters as utf-8 first, for example using $utfencode($chr(160),0) instead of just $chr(160) in this case.