I have been struggling with the UTF-8 charset for quite a while now, and I am still confused about some things.

I have a web page which allow clients to create HTML files and directories on server. The directory name can be in any language. *Adiós, días, chapter, level* etc. The directories created are later on used as a URL for the HTML files created. Let’s say the user created a directory `Adiós` and then a file called `welcome.html`. To view this file, the client clicks a link and for that I get the directory and file name to create a path `Adiós/welcome.html`. Now I am confused about these things.

1. When making the directory in php, should I `urlencode()` every file and directory name?
2. If I do `urlencode` the directory name, will the browser be able to open my HTML page? Instead of `href="Adiós/welcome.html"` it will be `href="Adi%C3%B3s/welcome.html"`.
3. There’s sometimes an image on my web page which I will src as `"Adi%C3%B3s/ing.jpg"`; is this going to work?
4. Should the url in address bar show non‐ASCII characters?

I actually `urlencode()`d everything but ran into issues as described in point 2 and 3, so I wanted to know what the right approach is for directory naming when working with languages other than English!