Android Question String returned by Spinner - char added

verolet

New Member
For information, the string returned by the SelectedItem function when you select an item in a Spinner (previously filled with a .txt file UTF8 encoded) has a particularity : a char is automaticaly added at the beginning of the string (ASCII code 63 - ?).
This char doesn't appear (in debugger for example), but it's here (string lenght is +1) and made unable string comparaison.
You must remove this char with simple :
txt = txt.SubString(1)
 

verolet

New Member
Of course.
I've re-encoded the SelectedItem in ASCII to view the "invisible" first char, but before that, i'm sure that the length is +1.
 

Attachments

  • listetri.txt
    64 bytes · Views: 134
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…