Anyone know of a tool to completely encode a string to URL encoding? Best known example is something to convert space character to %20. I want to do this for every single character. What's a good tool for this (linux)?
thanks everyone for down voting, if i cared what language i would have specified. couldnt find anything useful in the other post linked below so i wrote this. this is good enough for me, might be good enough for you.
#include <stdio.h>
// Treats all args as one big string. Inserts implicit spaces between args.
int main(int argc, char *argv[])
{
    if(argc == 1)
    {
        printf("Need something to encode.");
        return 1;
    }
    int count = 0;
    while(++count < argc)
    {
        char *input = argv[count];
        while(*input != '\0')
        {
            printf("%%%x", *input);
            input++;
        }
        printf("%%20");
    }
    printf("\n");
    return 0;
}
 
     
     
     
    