Hello, When using PROC ODSTEXT's P statement with strings containing %SYSFUNC(URLENCODE(...)), I'm getting unexpected results in certain cases. In particular, if the string being encoded has one or more digits and those digits are surrounded on both sides by a space, the digits and one of the spaces do not appear in the resulting text. An example: data foo;
s = urlencode('abc 123 xyz.txt');
s2 = "%sysfunc(urlencode(abc 123 xyz.txt))";
run;
proc odstext data=foo;
* First two work, third one loses the 123 and a space. ;
p s;
p s2;
p "%sysfunc(urlencode(abc 123 xyz.txt))";
* First one works, second one loses the 1 and a space. ;
p "%sysfunc(urlencode(this works just fine))";
p "%sysfunc(urlencode(this 1 has an issue))";
run; Is this the expected behavior? As the above example illustrates, it is possible to work around this issue by storing the encoded text in a data set first, but it does not seem that such an approach should be necessary, should it? This issue (or one very similar) appears to have also been encountered by @Quentin in this post. In that case, the resolution was to use the URL style. In my current case, that would not be applicable because the content I need to output is not being displayed as a clickable hyperlink to the user; rather, I am sending the content as a response from a stored process, and the client browser will be accessing the returned URL directly, without any interaction from the user. I'm on SAS 9.4M5. Thanks, Jake
... View more