title: Read data from NFC tag
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7917567/strange-character-on-android-ndef-record-payload">Strange character on Android NDEF record payload</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to read some plain text from NFC tag. and my codes are below;</p>
  
  <pre><code>public void processReadIntent(Intent intent){
  
      Parcelable[] rawMsgs = intent.getParcelableArrayExtra(
              NfcAdapter.EXTRA_NDEF_MESSAGES);
  
      NdefMessage msg = (NdefMessage) rawMsgs[0];
      // record 0 contains the MIME type, record 1 is the AAR, if present
      Log.d("msg", msg.getRecords()[0].getPayload().toString());
  
      String PatientId=new String(msg.getRecords()[0].getPayload());     
      String UserName="nurse";
      String Password="nurse";
  
     Toast.makeText(getApplicationContext(), PatientId, Toast.LENGTH_LONG).show();
  
      //tv.setText(new String(msg.getRecords()[0].getPayload()));
  }
  </code></pre>
  
  <p>BUT, the problem here is when i read data i can see that my desired data has a 'en' at the start.
  <strong>for example: if my actual data in 'john', when i read, i can see it as 'enjohn'.</strong>
  I know 'en' is the language header. But how do I remove it??</p>
  
  <p>i have tried with substring, but after that don't even work...</p>
  
  <p>any idea about how to remove this language header???</p>