01-18-2021, 06:16 PM
I was trying to write a filter to locate some things in HTML and I was quite surprised by this. If I do strstr() to search for <label> it's not found, but grep or search in the mc file viewer can find it.
I even tried putting them in as ASCII codes: snprintf(lbl,20,"%clabel%c",0x3c,0x3e); and it doesn't find them in the HTML. If I look at the HTML in hex mode of mc's file viewer they seem to be normal ASCII, not unicode.
This is nothing specific to a PBP except that I'm using gcc under Daniel Thompson's Bullseye on one. I tried escaping them by putting a \ in front of each one, that doesn't work. I'm pretty sure I've searched for HTML tags in C years ago, I don't remember this strangeness.
I even tried putting them in as ASCII codes: snprintf(lbl,20,"%clabel%c",0x3c,0x3e); and it doesn't find them in the HTML. If I look at the HTML in hex mode of mc's file viewer they seem to be normal ASCII, not unicode.
This is nothing specific to a PBP except that I'm using gcc under Daniel Thompson's Bullseye on one. I tried escaping them by putting a \ in front of each one, that doesn't work. I'm pretty sure I've searched for HTML tags in C years ago, I don't remember this strangeness.