Bill
Bill

Reputation: 1247

Progress URL encoding

What's the best way to encode a URL in progress. I want to build an encoded URL and don't want to write my own encoding function. Is there a command that can be run or a function that someone else already wrote?

www.abc.com/the one/

to

www.abc/the%20one/

See: http://www.w3schools.com/tags/ref_urlencode.asp for the list of things that need to be encoded

Upvotes: 1

Views: 1625

Answers (2)

Mattwmaster58
Mattwmaster58

Reputation: 2576

As a personal rule of thumb, if I have the choice between ABL code and literally anything else, I take anything else. You can use .NET's System.Net.WebUtility.UrlEncode like this:

USING System.Net.WebUtility FROM ASSEMBLY.

MESSAGE "www.abc.com/" + WebUtility:UrlEncode("the one").

Upvotes: 0

Screwtape
Screwtape

Reputation: 1367

There is an article on the Progress website, which Google found me with very little effort...

http://knowledgebase.progress.com/articles/Article/000042261

Note the disclaimers at the top of the article.

Upvotes: 1

Related Questions