title: urlencode() the 'asterisk' (star?) character
body: <p>I'm testing <strong>PHP</strong> <code>urlencode()</code> vs. <strong>Java</strong> <code>java.net.URLEncoder.encode()</code>.</p>
  
  <p><strong>Java</strong></p>
  
  <pre><code>String all = "";
  for (int i = 32; i &lt; 256; ++i) {
      all += (char) i;
  }
  
  System.out.println("All characters:         -||" + all + "||-");
  try {
      System.out.println("Encoded characters:     -||" + URLEncoder.encode(all, "utf8") + "||-");
  } catch (UnsupportedEncodingException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$all = "";
  for($i = 32; $i &lt; 256; ++$i)
  {
      $all = $all.chr($i);
  }
  
  echo($all.PHP_EOL);
  echo(urlencode(utf8_encode($all)).PHP_EOL);
  </code></pre>
  
  <p>All characters seem to be encoded in the same way with both functions, except for the 'asterisk' character that is not encoded by Java, and translated to %2A by PHP. Which behaviour is supposed to be the 'right' one, if any?</p>
  
  <p>Note: I tried with <code>rawurlencode()</code>, too - no luck.</p>