title: Any inbuilt Javascript function to encode '?
body: <p>I'm looking to encode special characters(ex: Japanese chars) along with <code>'</code>.
  encodeURIComponent() encodes special characters, but does not encode <code>'</code>.</p>
  
  <p>Any inbuilt Javascript function which does both(i.e encode Japanese chars as well as <code>'</code>?</p>