There is a good answer for this here:
SO: /generate-all-permutations-of-text-from-a-regex-pattern-in-c
The crux of the thing is this...define what you really need well and figure out a way to halt once you have what you need and narrow your search range as much as possible because you are flirting with a quickly exploding number of permutations. "anything that could appear in a URL filename must be accommodated." is not going to cut it. For example, if you limit yourself to English characters and numbers, for a string 6 characters long you are looking at over 2 billion combinations. For each additional character multiply by 36.
If you go with ISO 8859 you get over 274 trillion combinations and Unicode over 745 trillion-trillion combinations.