title: How to convert a nice page title into a valid URL string?
body: <p>imagine a page Title string in any given language (english, arabic, japanese etc) containing several words in UTF-8. Example:</p>
  
  <pre><code>$stringRAW = "Blues &amp; μπλουζ Bliss's ブルース Schön";
  </code></pre>
  
  <p>Now this actually needs to be converted into something thats a valid portion of a URL of that page:</p>
  
  <pre><code>$stringURL = "blues-μπλουζ-bliss-ブルース-schön"
  </code></pre>
  
  <p><a href="http://website.org/test/blues-%CE%BC%CF%80%CE%BB%CE%BF%CF%85%CE%B6-bliss-%E3%83%96%E3%83%AB%E3%83%BC%E3%82%B9-sch%C3%B6n" rel="noreferrer">just check out this link</a>
  This works on my server too!</p>
  
  <blockquote>
    <p><strong>Q1</strong>. What characters are allowed as valid URL these days? I remember having seen whol arabic strings sitting on the browser and i tested it on my apache 2 and all worked fine.</p>
  </blockquote>
  
  <p><strike>I guesse it must become: <code>$stringURL = "blues-blows-bliss-black"</code></strike></p>
  
  <blockquote>
    <p><strong>Q2.</strong> What existing php functions do you know that encode/convert these UTF-8 strings correctly for URL ripping them off of any invalid chars?</p>
  </blockquote>
  
  <p>I guesse that at least:
  1. spaces <code></code> should be converted into dashes <code>-</code><br>
  2. delete invalid characters? which are they?  <code>@</code> and '&amp;'?<br>
  3. converts all letters to lower case (or are capitcal letters valid in urls?)</p>
  
  <p>Thanks: your suggestions are much appreciated!</p>