|
-
May 10th, 2004, 07:15 PM
#1
Thread Starter
Lively Member
[RESOLVED] Need help with RFC 1738. (Escaping)
What's the best way to convert a byte array, or maybe a hex string into an RFC 1738 compliant URL value using VB.NET? To be completely honest I'm not really sure I understand the specification, and reading the documents on it did not help clear it up at all. Is there any code out there that I can learn from?
I'm trying to get this hex string:
b341fcc98e0e432e46cb481419f0ab81c2ddda5a
to look like this:
%b3A%fc%c9%8e%0eC.F%cbH%14%19%f0%ab%81%c2%dd%daZ
I should note that I created the first hex string from a byte array. So if it's easier to convert to the encoded URL format before conversion to hex, well then I'd like to know.
Thanks,
KT
Edit: The shared System.Web.HttpUtility.UrlEncode method provides a way to do this, by converting an array of bytes to its proper URL encoding format. Thank you Microsoft!
Last edited by Kt3; May 13th, 2004 at 09:53 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|