code: function encodeCharacter (chr) {
          var
              result = '',
              octets = utf8.encode(chr),
              octet,
              index;
          for (index = 0; index < octets.length; index += 1) {
              octet = octets.charCodeAt(index);
              result += '%' + (octet < 0x10 ? '0' : '') + octet.toString(16).toUpperCase();
          }
          return result;
      }
docs: encodes a character, if needed or not.
  @param chr
  @return pct-encoded character