title: Standardize a String for Filename, remove accents and special chars
body: <p>I'm trying to find a way to normalize a string to pass it as a filename.</p>
  
  <p>I have this so far:</p>
  
  <pre><code>my_string.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n, '').downcase.gsub(/[^a-z]/, '_')
  </code></pre>
  
  <p>But first problem: the - character. I guess there is more problems with this method.</p>
  
  <p>I don't control the name, <strong>the name string can have accents, white spaces and special chars</strong>. I want to remove all of them, replace the accents with the corresponding letter ('é' => 'e') and replace the rest with the '_' character.</p>
  
  <p>The names are like:</p>
  
  <ul>
  <li>"Prélèvements - Routine"</li>
  <li>"Carnet de santé"</li>
  <li>...</li>
  </ul>
  
  <p>I want them to <strong>be like a filename</strong> with no space/special chars:</p>
  
  <ul>
  <li>"prelevements_routine"</li>
  <li>"carnet_de_sante"</li>
  <li>...</li>
  </ul>
  
  <p>Thanks for the help :)</p>