Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List of illegal characters for URL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00770389
Message ID:
00770474
Views:
23
I guess this can help:
DECLARE INTEGER UrlEscape IN shlwapi;
	STRING pszURL, STRING @pszEscaped,;
	INTEGER @pcchEscaped, INTEGER dwFlags

DECLARE INTEGER UrlUnescape IN shlwapi;
	STRING pszURL, STRING @pszUnescaped,;
	INTEGER @pcchUnescaped, INTEGER dwFlags

LOCAL cSource, cTarget, cTarget1, nResult

cSource = "A rhyme: Jack and <Jill> went up a hill"

* converting 'unsafe' characters into escape sequences
nResult = 250
cTarget = Repli(Chr(0), nResult)
= UrlEscape(cSource, @cTarget, @nResult, 0)
cTarget = Left(cTarget, nResult)

* converting escape sequences back to 'unsafe' characters
nResult = 250
cTarget1 = Repli(Chr(0), nResult)
= UrlUnescape(cTarget, @cTarget1, @nResult, 0)
cTarget1 = Left(cTarget1, nResult)

? cSource
? cTarget
? cTarget1
Previous
Reply
Map
View

Click here to load this message in the networking platform