
For several reasons, only plain ASCII characters are accepted in Web URIs. Other characters should be escaped with % and the hexadecimal value of its code.
The tilde character ~
is not needed to be escaped... at least in theory... because in practice most code expects it...
A journey into confusing RFCs...