Rotate 47 Encoder

Input Text:



Encoded Output:








Usage Example (display):


<html>
 <head>
  <script type="text/javascript">
  <!--
    function rot47(data)
    {
      var res = "";

      for(var i = 0; i < data.length; i++)
      {
          var ch = data.charCodeAt(i);
          res += (ch + 47 >= 126) ? String.fromCharCode(" ".charCodeAt(0) + (ch + 47) % 126) : String.fromCharCode(ch + 47);
      }

      return res;
  }
  //-->
  </script>

 </head>

 <body>

  <script type="text/javascript">
  <!--
    // prevent email address from being obtained by spam bots
    var emailAddress = "k2O9C67lQ>2:=E@iD@>6@?6o9@DE]4@>Qm6\>2:=O>6O2EOD@>6@?6o9@DE]4@>k^2m";
    document.write(rot47(emailAddress)); 
  //-->
  </script>

 </body>
</html>