progress-4glopenedgewebspeed

How to write progress code equivalent to encodeuricomponent of javascript?


I have a variable with data type longchar which holds the value:

val='DQoJICA8bGkgY2xhc3M9ImhvbWUiPjxhIGhyZWY9InkyeWdlbmVyYWx3b3JsZC5wP3dvcmxkPWdlbmVyYWwiPltsLXBmaG9tZV08L2E+ID4gPGEgaHJlZj0ieTJkYXNoYm9hcmQucD93b3JsZD1idWxsZXQiPkJ1bGxldCBbbC1ob21lXTwvYT48L2xpPiANCgkJICAgDQoJCSAgPCEtLSBbcHJldmxpbmstc3RhcnRdIC0tPjxsaSBjbGFzcz0iIiA+ID4gPGEgaHJlZj0iamF2YXNjcmlwdDp2b2lkKDApIiBvbkNsaWNrPSJyZXR1cm4gZmFsc2U7Ij5bbC1yZWNlbnRpdGVtXTwvYT48L2xpPjwhLS0gW3ByZXZsaW5rLXN0b3BdIC0tPg0KCQk='

I transfered this variable with page redirect.

run p-redirectto( 'mynextpage.p?value=' + val).

in mynextpage.p i get the value of variable val as:

val='DQoJICA8bGkgY2xhc3M9ImhvbWUiPjxhIGhyZWY9InkyeWdlbmVyYWx3b3JsZC5wP3dvcmxkPWdlbmVyYWwiPltsLXBmaG9tZV08L2E ID4gPGEgaHJlZj0ieTJkYXNoYm9hcmQucD93b3JsZD1idWxsZXQiPkJ1bGxldCBbbC1ob21lXTwvYT48L2xpPiANCgkJICAgDQoJCSAgPCEtLSBbcHJldmxpbmstc3RhcnRdIC0tPjxsaSBjbGFzcz0iIiA ID4gPGEgaHJlZj0iamF2YXNjcmlwdDp2b2lkKDApIiBvbkNsaWNrPSJyZXR1cm4gZmFsc2U7Ij5bbC1yZWNlbnRpdGVtXTwvYT48L2xpPjwhLS0gW3ByZXZsaW5rLXN0b3BdIC0tPg0KCQk'

My problem is I want the value stored in val in mynextpage.p exactly it was before i redirect to this page.

how am i supposed to do this?


Solution

  • Assuming webspeed there is a URL-ENCODE( ) method.