code: function ustring (val) {
    var str = String(val)
  
    // percent encode as UTF-8
    var encoded = encodeURIComponent(str)
      .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode)
  
    return 'UTF-8\'\'' + encoded
  }
docs: Encode a Unicode string for HTTP (RFC 5987).
  
  @param {string} val
  @return {string}
  @private