SoraHjort

hackmud Unicode Dumper Script

Oct 25th, 2016
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function(context, args)
  2. {
  3.  
  4. var active = 1;
  5. var num = 0;
  6. var width = 0;
  7. var chars = ["`5Begin Unicode Character Dump...`\n\n"];
  8.  
  9. while (active == 1){
  10.     if (num <= 55295 || num <= 65535 && num >= 57344){
  11.     chars.push(String.fromCharCode(num));
  12.     num++
  13.     width++
  14.     if (width == 64){
  15.         chars.push("\n");
  16.         var width = 0;
  17.         }
  18.     } else if (num >= 55296 && num <= 57343){
  19.         var num = 57344;
  20.         chars.push("\nEnd Section 1\nSection 2 Start\n");
  21.     } else {
  22.     var active = 0;
  23.     return chars.join('')+"\nCharacters from `L\\u``H{``V0000-D7FF``H}` & `L\\u``H{``VE000-FFFF``H}`";
  24.         }
  25.     }
  26. }
Add Comment
Please, Sign In to add comment