title: Sanitizing Unicode strings for URL slugs (Ruby/Rails)
body: <p>I have UTF-8 encoded post titles which I'd rather show using the appropriate characters in slugs. An example is <a href="http://www.amazon.co.jp/%E4%BB%BB%E5%A4%A9%E5%A0%82-203135011-%E3%83%8C%E3%83%B3%E3%83%81%E3%83%A3%E3%82%AF-%E3%82%B7%E3%83%AD/dp/B000KF9E6Q/ref=pd_sim_vg_5?ie=UTF8&amp;refRID=0JK7MGYG8GTGBJ6NMTSA" rel="nofollow noreferrer">Amazon Japan's URL here</a>.</p>
  
  <p>How can any arbitrary string be converted to a safe URL slug such as this, with Ruby (or Rails)?</p>
  
  <p>(There are some <a href="https://stackoverflow.com/questions/9511254/how-to-create-unicode-slug-for-unicode-title">related</a> <a href="https://stackoverflow.com/questions/2668854/sanitizing-strings-to-make-them-url-and-filename-safe">PHP</a> posts, but nothing I could find for Ruby.)</p>