Hey all,
I'm trying to parse an html table from a machine to get some data from it, the html page loads correctly on a web browser so I didn't think it would be an issue, but when I try and get the data from the system.net.httpGet() function there is a \x00 before every character of the html code.
I tried it with www.google.com and it returns the html correctly, is this just an old version of html? Is there a way to scrub out all of the \x00 characters?
Nevermind, I removed them with .replace('\x00', '')
and that seemed to work fine.
Not exactly strictly related to your issue, but I'd strongly recommend avoiding the htttpGet/post/etc functions in favor of system.net.httpClient. It's faster, capable of actually returning things other than strings, has better content encoding and decoding built ins, and is generally a much better experience all around.
1 Like
are you in control of the data that is being posted? because you should probably look into that instead of fixing it on the receiving end
this looks like an encoding issue (utf8 or utf 16)
im guessing is you are sending the data as utf 16 but read it as utf 8
3 Likes