$utf8 + upsidedown and octatext
Platform: mIRC
Published Aug 02, 2009
Updated Mar 07, 2011

This alias will convert the decimal number associated with a utf-8 image to the ascii combinations needed to display it in mIRC. I have no idea why this isn't already included in mIRC ;/
The modular division and binary math needed to do this conversion would require several pages to explain, so I'm not going to bore you with that. If someone would like to discuss the math involved here, please see me in irc.
To make sure utf8 is enabled on your mIRC - Do this first:
Go to Tools - Options - IRC - Messages
Make sure The 6 boxes at the bottom are checked.

If you still are seeing ??? question marks, Right click the channel, on the treebar or the channel box at the bottom/top and click Font.
Under utf8 select Display & Encode.
How to use this?
I included 3 basic aliases to demonstrate how to use $utf8
The first one will print your text upsidedown and backwards.
Syntax /flip text or $flip(text)
And the second will print the letters and numbers inside a octagon.
Syntax /Octatext text or $octatext(text)
New alias added /small
Syntax /small text or $small(text)
;$utf8 conversion for mIRC by Ford_Lawnmower irc.mindforge.org #USA-Chat
alias UTF81 {
if ($1 < 161) { return $chr($1) }
elseif ($len($base($1,10,2)) < 12) { return $+($chr($calc(192 + $div($1,64))),$chr($calc(128 + [ $1 % 64 ] ))) }
elseif ($len($base($1,10,2)) < 17) { return $+($chr($calc(224 + $div($1,4096))),$chr($calc(128 + [ $div($1,64) % 64 ] )),$chr($calc(128 + [ $1 % 64 ] ))) }
elseif ($len($base($1,10,2)) < 22) {
return $+($chr($calc(240 + $div($1,262144))),$chr($calc(128 + [ $div($1,4096) % 64 ] )),$chr($calc(128 + [ $div($1,64) % 64 ] )),$&
$chr($calc(128 + [ $1 % 64 ] )))
}
}
alias -l div { return $int($calc($1 / $2)) }
alias UTF8 {
if ($version >= 7) return $chr($1)
else {
var %x $base($1,10,2),%y $len(%x)
if ($1 < 161) { return $chr($1) }
elseif (%y < 12) { return $+($shift(11000000,$left(%x,-6)),$shift(10000000,$right(%x,6))) }
elseif (%y < 17) { return $+($shift(11100000,$left(%x,-12)),$shift(10000000,$mid(%x,-12,6)),$shift(10000000,$right(%x,6))) }
elseif (%y < 22) {
return $+($shift(11110000,$left(%x,-18)),$shift(10000000,$mid(%x,$iif(%y < 18,$+(-,%y),-18),6)),$shift(10000000,$mid(%x,-12,6)),$shift(10000000,$right(%x,6)))
}
}
}
alias -l shift {
if ($2) { return $chr($base($+($left($1,$+(-,$len($2))),$2),2,10)) }
else { return $chr($base($1,2,10)) }
}
alias UrlEncode {
return $regsubex($1-,/([^a-z0-9])/ig,$+(%,$base($UTF8($asc(\t)),10,16,2)))
}
Menu channel,status {
.Text Tricks
..Fliptext:flip $?="Enter the text to be fliped"
..Octatext:Octatext $?="Enter the text for Octagon conversion"
}
alias octatext {
var %octa $regsubex($1-,/([a-z])/g,$utf8($calc($asc($regml(\n)) + 9327)))
%octa = $regsubex(%octa,/([A-Z])/g,$utf8($calc($asc($regml(\n)) + 9333)))
$iif($isid,return,$iif($active ischan,say,echo -a)) $regsubex(%octa,/([1-9])/g,$utf8($calc($asc($regml(\n)) + 10063)))
}
alias flip {
var %flip, %end $len($1-)
while (%end) {
%flip = $+(%flip,$replace($mid($1-,%end,1),$chr(32),$chr(7)))
dec %end
}
%flip = $replacex(%flip,a,$utf8(592),b,q,c,$utf8(596),d,p,e,$utf8(601),f,$utf8(607),g,$utf8(595),h,$utf8(613),i,$utf8(618),j,$utf8(638),k,$utf8(670),$&
l,$utf8(305),m,$utf8(623),n,u,o,o,p,d,q,b,r,$utf8(633),s,s,t,$utf8(647),u,n,v,$utf8(652),w,$utf8(653),y,$utf8(654),.,$utf8(729),?,$utf8(191),z,z,$chr(7),$chr(32))
$iif($isid,return,$iif($active ischan,say,echo -a)) %flip
}
alias small {
var %small = $replacex($1-,a,$utf8(7424),b,$utf8(665),c,$utf8(7428),d,$utf8(7429),e,$utf8(7431),f,$utf8(1171),g,$utf8(610),h,$utf8(668),i,$utf8(1110),$&
j,$utf8(7434),k,$utf8(7435),l,$utf8(671),m,$utf8(7437),n,$utf8(628),o,$utf8(7439),p,$utf8(7448),q,$utf8(587),r,$utf8(640),s,$utf8(1109),$&
t,$utf8(7451),u,$utf8(7452),v,$utf8(7456),w,$utf8(7457),x,$utf8(1093),y,$utf8(655),z,$utf8(7458))
$iif($isid,return,$iif($active ischan,say,echo -a)) %small
}