You are correct. Excepting `-_.~` seems to conform with RFC3986. I read the function documentation wrong. Sorry.