demo/content-disposition/index.js
function pencode(char) {
  var hex = String(char)
    .charCodeAt(0)
    .toString(16)
    .toUpperCase()
  return hex.length === 1
    ? '%0' + hex
    : '%' + hex
}
function pencode(char) {
  var hex = String(char)
    .charCodeAt(0)
    .toString(16)
    .toUpperCase()
  return hex.length === 1
    ? '%0' + hex
    : '%' + hex
}
function pencode ( char ) { var hex = String ( char ) . charCodeAt ( 0 ) . toString ( 16 ) . toUpperCase ( ) return hex . length === 1 ? '%0' + hex : '%' + hex }
Percent encode a single character.

@param {string} char
@return {string}
@api private
Percent encode a single character .