Top

$utf8 + upsidedown and octatext


mIRC Code
+ 4 likes
Please Register to submit score.
Bookmark and Share
Average Score  10.0 (of 2 scores)
Date Added  Aug 02, 2009
Last Updated  Aug 02, 2009
Tags  down  upside  utf8 

Introduction


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?
One way is to use the Character Map program included with windows to find characters that you want to use and use the H2U alias I have included. $H2U() will convert the hexidecimal number that you see in Character Map to mIRC utf8.
I have also included an alias that will show you the characters 1000 at a time.
To try it just type /prnUTF8 1
This will show the characters from 1 to 1001.
If you type /prnUTF8 1000 It will show the next 1000.
You can also use google to find charts with the images and the hexidecimal or decimal numbers.

I also included 2 basic aliases to demonstrate how to use $utf8 and $H2U.
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)

I really should explain this more, but I almost fried my brain figuring this one out ;/


Grab the Code

;$utf8 conversion for mIRC by Ford_Lawnmower irc.mindforge.org #USA-Chat
alias UTF8 {
  if ($1 < 255) { return $chr($1) }
  if ($1 >= 256) && ($1 < 2048) { return $+($chr($calc(192 + $div($1,64))),$chr($calc(128 + $mod($1,64)))) }
  if ($1 >= 2048) && ($1 < 65536) { return $+($chr($calc(224 + $div($1,4096))),$chr($calc(128 + $mod($div($1,64),64))),$chr($calc(128 + $mod($1,64)))) }
  if ($1 >= 65536) && ($1 < 2097152) {
    return $+($chr($calc(240 + $div($1,262144))),$chr($calc(128 + $mod($div($1,4096),64))),$chr($calc(128 + $mod($div($1,64),64))),$&
      $chr($calc(128 + $mod($1,64))))
  }
}
alias -l div { return $int($calc($1 / $2)) }
alias -l mod {
  var %int $int($calc($1 / $2))
  return $calc($1 - (%int * $2))
}
alias H2U { return $utf8($base($1,16,10)) }
alias prnUTF8 {
  var %start $1, %finish $calc($1 + 1000)
  while (%start <= %finish) {
    echo -a %start = $utf8(%start)
    inc %start
  }
}
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-,/([abcdefghijklmnopqrstuvwxyz])/g,$utf8($calc($asc($regml(\n)) + 9327)))
  %octa = $regsubex(%octa,/([ABCDEFGHIJKLMNOPQRSTUVWXYZ])/g,$utf8($calc($asc($regml(\n)) + 9333)))
  $iif($isid,return,$iif($active ischan,say,echo -a)) $regsubex(%octa,/([123456789])/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,$h2u(250),b,q,c,$h2u(254),d,p,e,$h2u(259),f,$h2u(25f),g,$h2u(253),h,$h2u(265),i,$h2u(26a),j,$h2u(27e),k,$h2u(29e),$&
    l,$h2u(131),m,$h2u(26f),n,u,o,o,p,d,q,b,r,$h2u(279),s,s,t,$h2u(287),u,n,v,$h2u(28c),w,$h2u(28d),y,$h2u(28e),.,$h2u(2d9),?,$h2u(bf),z,z,$chr(7),$chr(32))
  $iif($isid,return,$iif($active ischan,say,echo -a)) %flip
}
 

Comments

  (17)  RSS
blitzz
Comments: 122
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 3, 2009 2:31 am
Nice script FordLawnmower..and i feel funny to see the text flip/octat..and looks neat too..
VinX
Comments: 56
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 3, 2009 3:27 am
neat and sweet :) thanks
Cheiron
Comments: 627
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 3, 2009 10:40 am
errrr ... !
this is gotta be the most bizzare thing i have seen yet lol..
awesome
Quote:

04<04:36pm> <Cheiron> ˙˙˙˙ʇxəʇ ppo
04<04:36pm> <Cheiron> oops


gets a like and a 10 just for the sheer wtf factor lol
eyiezinc
Comments: 38
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 3, 2009 12:23 pm
nice looking clean codes.. 10/10.
FordLawnmower
Comments: 411
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 6, 2009 7:27 pm
O.o :) Thank you everyone :)
Ryan-
Comments: 4
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 7, 2009 5:48 pm
you can also use Calibri xP
Gummo
Comments: 153
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 8, 2009 3:26 am
You know, the modulus of two numbers is $calc(num1 % num2)
FordLawnmower
Comments: 411
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 8, 2009 8:32 am
Nope I didn't know that Gummo. Thanks for the info :) When I finally found a formula that would generate the characters correctly everytime, I quickly made the script without the mod alias. I added the mod alias later to remove some repetition, but I would have never guessed that mIRC had modulus function. Useful information :)
}{exer
Comments: 21
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 9, 2009 8:33 pm
Very good Work !
Its a giant thing with over 200.000 Signs for Show.
Chinese, Arabic all is now easy to bring up on Screen :))
I like it.
Thank you
FordLawnmower
Comments: 411
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 9, 2009 8:49 pm
Thanks }{exer :)
nublet
Comments: 3
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 30, 2009 2:48 pm
Hey Ford once again love the work. I however have been having this issue for sometime not just with this script but other text characters in mirc. Where all i see is a box when i do the flipped text it is fine but with the octatext all i can see are boxes. Any ideas on what could be causing this ?
FordLawnmower
Comments: 411
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Aug 30, 2009 3:05 pm
Yea nublet, it usually means that the font that contains that language has not been loaded. The cube means unknown character.
You can usually fix this by adding all the languages.
For XP go here -->> http://support.microsoft.com/kb/177561 <-- and scroll down to xp instructions.
For Vista go here -->> http://windowshelp.microsoft.com/Windows/en-US/help/52e368fa-bd32-4749-955e-331f9130889f1033.mspx
I hope this helps nublet :)
Cheiron
Comments: 627
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Sep 14, 2009 2:58 pm
as a crazy thought ... you got any more updates planned on this at all to add to it so we can have some more really whacky effects .. or maybe a combination of the octo and the flip intogether.. so it sort of did a random selection of them both in the sentance / word
montague
Comments: 21
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Oct 17, 2009 7:15 pm
For an upside down text u could do it like this too:

/alias ud say $regsubex($replacex($regsubex($lower($1-),/(.)/g,$mid(\A,-\n,1)),a,C9 90,b,q,c,C9 94,d,p,e,C7 9D,f,C9 9F,g,C6 83,h,C9 A5,i,C4 B1,j,C9 BE,k,CA 9E,l,CA 83,m,C9 AF,n,u,p,d,q,b,r,C9 B9,t,CA 87,u,n,v,CA 8C,w,CA 8D,y,CA 8E),/([A-F\d]{2}) ([A-F\d]{2})/g,$chr($base(\1,16,10)) $+ $chr($base(\2,16,10)))

u could start it with /ud <ur text here>
FordLawnmower
Comments: 411
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Oct 17, 2009 8:21 pm
Those bouncing cats are going to make me insane P:
This alias is for utf8 conversion montague. The upsidedown is just One example of it's use.
Cool alias though :) It shows the power of nested regsubex.
Did you make this alias?
If so, could you take a moment to explain it here?
If not I can explain it in my next post.
It took me quite a while to wrap my head around how it works.
Got a headache now ;/
darah
Comments: 1
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Oct 31, 2009 12:20 am
thanks nice posting
FordLawnmower
Comments: 411
 
mIRC Snippet:  $utf8 + upsidedown and octatext
Posted on Oct 31, 2009 8:05 pm
Thanks darah :)

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom