I am writing and reading from Mifare cards - RFID .
In WRITE to the map, I use Byte[] as follows:
byte[] buffer = Encoding.ASCII.GetBytes(txt_IDCard.Text);
Then, before READ from the map, I get some error with special characters when it should show me é, ã, õ, á, à... Instead, do I get ? :
string result = System.Text.Encoding.UTF8.GetString(buffer); string result2 = System.Text.Encoding.ASCII.GetString(buffer, 0, buffer.Length); string result3 = Encoding.UTF7.GetString(buffer);
For example: instead I get Àgua, amanhã, você I get / read ?gua, amanh?, voc? .
How can I solve it?
Ghaleon
source share