Connect to server - password syntax (symbols) confusing the expression

I'd like to connect to my local server using the following expression in Finder/Go/Connect to server: afp://username:[email protected]

My password is using characters which I'm pretty sure are confusing the readability of this expression (e.g. @, %, perhaps other characters) - and I know nothing about UNIX. Say if my password was p@s$w%rd, the expression would look as such afp://username:p@s$w%[email protected] but because there is an @ it will confuse its readability. However, I don't want to compromise on the server's security and would like to keep freedom of syntax for my login credentials.

Is there a way to isolate the password syntax in a way to tell my computer to read the password from a specific input to an output?


Solution 1:

I wasn't sure whether this would work, but after comments it appears it does…

Use percent encoding like you see on web addresses, where potentially confusing symbols are replaced by a percentage sign followed by a hexadecimal number, as this table...

enter image description here

So the initial p@s$w%rd would become p%40s%24w%25rd