<p>I have a directory with PDF files that I need to create an index for. It is a PHP page with a list of links:</p>

<pre><code>&lt;A HREF="path to file"&gt;filename&lt;/A&gt;
</code></pre>

<p>The filenames can be complicated:</p>

<pre><code>LVD 2-1133 - Ändring av dumpningslina (1984-11-20).pdf
</code></pre>

<p>What is the correct way to link to this file on a Linux/Apache server?</p>

<p>Is there a PHP function to do this conversion?</p>

urlencode()
should probably do what you want.
Edit
: urlencode() works fine on swedish characters.
```
```
<?php
        echo urlencode("åäö");   
    ?>
```
```
converts to:
```
```
%E5%E4%F6
```
```