Subj : Tool wanted To : Angus Mcleod From : Digital Man Date : Thu Dec 02 2004 01:13 pm Re: Tool wanted By: Angus Mcleod to Frank Reid on Thu Dec 02 2004 08:26 am > > > Damn! That's exactly what I need to do. :-/ > > > > I cobbled this together based on some code I found on Google for the > > RFC-1738 stuff. There are absolutely no bounds checking on the main > > routine, which only "encodes" the input string passed to the program. > > Maybe you can work something with this? > > See recently posted perl scripts that do what I need. Thanks for your > efforts, anyway. > > Your C version is probably more portable, but Ugh! Is it ugly? :-) You > tempt me to try an implementation in C myself. Why not do a JS implementation? I believe URL/URI encoding/decoding is a "core" function (http://synchro.net/docs/js/ref/). And you could use Synchronet's jsexec to execute it. A shell script to execute it (reaing from stdin) would be something like: #!/sbbs/exec/jsexec write(encodeURI(readln())); // Or to encode a command-line argument: write(encodeURI(argv[0])); Too simple I think. :-) digital man Snapple "Real Fact" #83: Googol is a number (1 followed by 100 zeros). .