title: how to implement from php rawurlencode to java
body: <p>i have question</p>
  <p>i have php code like this :</p>
  <pre><code> $auth_header = &quot;OAuth &quot;
          . 'oauth_signature=&quot;' . rawurlencode($signature) . '&quot;, '
          . 'oauth_version=&quot;' . rawurlencode($oauth_version) . '&quot;, '
          . 'oauth_nonce=&quot;' . rawurlencode($oauth_nonce) . '&quot;, '
          . 'oauth_signature_method=&quot;' . rawurlencode($oauth_signature_method) . '&quot;, '
          . 'oauth_consumer_key=&quot;' . rawurlencode(NETSUITE_CONSUMER_KEY) . '&quot;, '
          . 'oauth_token=&quot;' . rawurlencode(NETSUITE_TOKEN_ID) . '&quot;, '
          . 'oauth_timestamp=&quot;' . rawurlencode($oauth_timestamp) . '&quot;, '
          . 'realm=&quot;' . rawurlencode(NETSUITE_ACCOUNT) . '&quot;';
  </code></pre>
  <p>how to implement rawurlencode from php on java code ? or change to java code</p>
  <pre><code>&quot;OAuth realm=\&quot;&quot;+ URLEncoder.encode(&quot;accountId&quot;,StandardCharsets.UTF_8.toString()) + &quot;\&quot;,&quot;
                  + &quot;oauth_consumer_key=\&quot;&quot; + URLEncoder.encode(&quot;NETSUITE_CONSUMER_KEY&quot;,StandardCharsets.UTF_8.toString()) + &quot;\&quot;,&quot;
                  + &quot;oauth_token=\&quot;&quot; + URLEncoder.encode(&quot;NETSUITE_TOKEN_ID&quot;,StandardCharsets.UTF_8.toString()) + &quot;\&quot;,&quot;
                  + &quot;oauth_signature_method=\&quot;&quot; + URLEncoder.encode(&quot;HMAC-SHA256&quot;,StandardCharsets.UTF_8.toString()) + &quot;\&quot;,&quot;
                  + &quot;oauth_timestamp=\&quot;&quot; + URLEncoder.encode(String.valueOf(oauthTimestamp),StandardCharsets.UTF_8.toString())+ &quot;\&quot;,&quot;
                  + &quot;oauth_nonce=\&quot;&quot; + URLEncoder.encode(oauthNonce,StandardCharsets.UTF_8.toString()).replace(&quot;*&quot;, &quot;%2a&quot;).replace(&quot;+&quot;, &quot;%20&quot;) + &quot;\&quot;,&quot;
                  + &quot;oauth_version=\&quot;&quot; + URLEncoder.encode(&quot;1.0&quot;,StandardCharsets.UTF_8.toString()) + &quot;\&quot;,&quot;
                  + &quot;oauth_signature=\&quot;&quot; + URLEncoder.encode(signature,StandardCharsets.UTF_8.toString())+&quot;\&quot;&quot;;
  </code></pre>
  <p>because if i see on php and on java there is different value</p>