Charlie Gibbs
2021-11-24 16:57:28 UTC
Hello all,
As in the subject line : I've got a relative URL path with arguments it
which I need to have its special chars escaped so it can be used in a HTTP
"/some+part/another+part?arg1=foo+42%23brown&arg2=bar+fly"). The thing is
that I can't seem to find an API function for it.
The ShlwApi UrlEscape function doesn't even seem to want to touch the
arguments on a full URL, and the WinInet InternetCreateUrl function does not
want to function with only the path and arguments parts being provided.
Looking at what docs.microsoft.com says about them does not show any leads
either.
In other words, does someone know which function I'm supposed to use to
create an escaped relative URL with arguments ?
Or am I supposed to (again) just roll my own ...
Maybe I'm different in that I've been writing string parsing codeAs in the subject line : I've got a relative URL path with arguments it
which I need to have its special chars escaped so it can be used in a HTTP
"/some+part/another+part?arg1=foo+42%23brown&arg2=bar+fly"). The thing is
that I can't seem to find an API function for it.
The ShlwApi UrlEscape function doesn't even seem to want to touch the
arguments on a full URL, and the WinInet InternetCreateUrl function does not
want to function with only the path and arguments parts being provided.
Looking at what docs.microsoft.com says about them does not show any leads
either.
In other words, does someone know which function I'm supposed to use to
create an escaped relative URL with arguments ?
Or am I supposed to (again) just roll my own ...
for decades, but for me it's much faster to roll my own than go
through all the stuff you've described above (and you still haven't
found a solution yet).
Don't be afraid to do your own parsing. It's often simpler than
figuring out how to use some proprietary API. And it's actually
kind of fun once you get into it.
Besides, you might want your program to run on a Linux box someday...
--
/~\ Charlie Gibbs | Microsoft is a dictatorship.
\ / <***@kltpzyxm.invalid> | Apple is a cult.
X I'm really at ac.dekanfrus | Linux is anarchy.
/ \ if you read it the right way. | Pick your poison.
/~\ Charlie Gibbs | Microsoft is a dictatorship.
\ / <***@kltpzyxm.invalid> | Apple is a cult.
X I'm really at ac.dekanfrus | Linux is anarchy.
/ \ if you read it the right way. | Pick your poison.