title: Writing URL to NFC chip
body: <p>I'm writing a URL to an NFC tag (inside a URI record). My problem is that when I read the chip, "%20" is added after "www." and before the remaining part of the URL.</p>
  
  <p>The URL looks like this:</p>
  
  <pre>www.%20google.ca</pre>
  
  <p>when it should actually look like this:</p>
  
  <pre>www.google.ca</pre>
  
  <p>The code below is the write function that I use to write the URL to the chip:</p>
  
  <pre><code>String copy = txtTagContent.getText().toString();
  byte[] uriField = copy.getBytes(Charset.forName("US-ASCII"));
  byte[] payload = new byte[uriField.length + 1];              //add 1 for the URI Prefix
  payload[0] = 0x01;                                      //prefixes http://www. to the URI
  System.arraycopy(uriField, 0, payload, 1, uriField.length);  //appends URI to payload
  NdefRecord rtdUriRecord = new NdefRecord(
          NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_URI, new byte[0], payload);
  NdefMessage message = new NdefMessage(rtdUriRecord);
  Ndef ndef = Ndef.get(tag);
  ndef.connect();
  ndef.writeNdefMessage(message);
  ndef.close();
  </code></pre>
  
  <p>Is there a solution to this problem?</p>