enconding problem

I have a page that shows some files and folders with utf-8 enconding (unix with utf-8 file character set).

There the user select some files and download them.

My problem is that some files may have other filename enconding than utf-8 so it does not appears ok at form.

So how can I will be sure that the filename will be ok at this form?

I had the solution at the post to convert to utf from the character enconding but the file names do not appears ok at the form.