Avon Member Licensed User Longtime User Sep 14, 2011 #1 Some of the data which I'm retrieving from a webpage contains URL-encoded constants (like &. It looks like a job for URLdecode (StringUtils method), but it doesn't work, not for me anyway: code: Code: Copy dim su as StringUtils label1.Text = su.DecodeUrl( sTitle, "UTF16") & " " & sdate same result with 1) "UTF-16" 2)"Unicode". expected result: MARKS & SPENCER Click to expand... actual result: MARKS & SPENCER Click to expand...
Some of the data which I'm retrieving from a webpage contains URL-encoded constants (like &. It looks like a job for URLdecode (StringUtils method), but it doesn't work, not for me anyway: code: Code: Copy dim su as StringUtils label1.Text = su.DecodeUrl( sTitle, "UTF16") & " " & sdate same result with 1) "UTF-16" 2)"Unicode". expected result: MARKS & SPENCER Click to expand... actual result: MARKS & SPENCER Click to expand...
agraham Expert Licensed User Longtime User Sep 15, 2011 #2 Those are HTML character entity references not URL encodings (percent-encodings). The crudest way is to transform them is by String.Replace but maybe someone more in tune with HTML/XML than I can think of a more elegant solution. Upvote 0
Those are HTML character entity references not URL encodings (percent-encodings). The crudest way is to transform them is by String.Replace but maybe someone more in tune with HTML/XML than I can think of a more elegant solution.
Avon Member Licensed User Longtime User Sep 15, 2011 #3 You're right of course. Percentages, ampersands, all sqiggly stuff. I'll code it. Thanks agraham! Upvote 0