import re;f=lambda s:''.join(re.match("[!'-*.\w-]",c,256)and c or'%%%02X'%ord(c)for c in s)
print(f(u"http://c...content-available-to-author-only...e.com/"))
print(f(u"[@=>]{#}"))
print(f(u"Test String"))
print(f(u"ÑÉÐÔ®"))
print(f(u"\x0f\x16\x7f"))
aW1wb3J0IHJlO2Y9bGFtYmRhIHM6Jycuam9pbihyZS5tYXRjaCgiWyEnLSouXHctXSIsYywyNTYpYW5kIGMgb3InJSUlMDJYJyVvcmQoYylmb3IgYyBpbiBzKQoKcHJpbnQoZih1Imh0dHA6Ly9jLi4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi5lLmNvbS8iKSkKcHJpbnQoZih1IltAPT5deyN9IikpCnByaW50KGYodSJUZXN0IFN0cmluZyIpKQpwcmludChmKHUiw5HDicOQw5TCriIpKQpwcmludChmKHUiXHgwZlx4MTZceDdmIikp