in reply to replacing special characters in file

If you just want to remove them or, say, replace them with underscores, this may be just as simple as
s/[^[:print:]]/_/g;
otherwise if you want to replace each one of them with a string of your choice, you could build up a suitable hash and then
s/[^[:print:]]/$hash{$&}/g; # Some people dislike $&
It's not entirely clear to me if you have such a list or if you're searching one. If you have one only for a limited number of chars, you may want to
s/[^[:print:]]/$hash{$&} || '_'/ge; # or # s/[^[:print:]]/exists $hash{$&} ? $hash{$&} : '_'/ge;
Or else you may want to use some URI escaping package e.g. URI::Escape.

Update: reading Joost's reply, I realize that I may have completely misunderstood your question.