Android Question How to remove ASCII65279 from string

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All,

Without distracting you with the in's and out's, my program reads a line of text from a file that can be edited by the user. If the user uses notepad or notepad++ ASCII65279 [Non printable char] can be added to the start of the line. As I do a "string" comparison this extra char throws everything out of wack.

The question is, once I have read the line of text how do I remove ASCII65279?
I have tried Riedlyne
B4X:
Riedlyne = Riedlyne.Replace(Asc(65279),"")
without success.
I could test with something like
B4X:
if (Asc(Riedlyne.CharAt(0))) = 65279 then DoSomething
to produce alternative string comparisons but that is messy.

Regards Roger
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…