You can use the ~/ in a file name to mean your home directory, or ~user-id/ to mean the home directory of a user whose login name is user-id. (On DOS and Windows systems, where a user doesn't have a home directory, Emacs substitutes ~/ with the value of the environment variable HOME; see General Variables.)
To access a file with $ in its name, type $$. This pair is converted to a single $ at the same time as variable substitution is performed for a single $. Alternatively, quote the whole file name with /: (see Quoted File Names). File names which begin with a literal ~ should also be quoted with /:.
The Lisp function that performs the substitution is called substitute-in-file-name. The substitution is performed only on file names read as such using the minibuffer.
You can include non-ASCII characters in file names if you set the variable file-name-coding-system to a non-nil value. See Specify Coding.

