This vector demonstrates which characters cause encodeURIComponent to throw an exception when attempting to URL encode.
try{
encodeURIComponent(String.fromCodePoint($[i]))
} catch {
log($[i]);
} try{
encodeURIComponent(String.fromCodePoint(55296))
} catch {
alert(55296);
} try{
encodeURIComponent(String.fromCodePoint(55297))
} catch {
alert(55297);
} try{
encodeURIComponent(String.fromCodePoint(55298))
} catch {
alert(55298);
} try{
encodeURIComponent(String.fromCodePoint(55299))
} catch {
alert(55299);
} try{
encodeURIComponent(String.fromCodePoint(55300))
} catch {
alert(55300);
} try{
encodeURIComponent(String.fromCodePoint(55301))
} catch {
alert(55301);
} try{
encodeURIComponent(String.fromCodePoint(55302))
} catch {
alert(55302);
} try{
encodeURIComponent(String.fromCodePoint(55303))
} catch {
alert(55303);
} try{
encodeURIComponent(String.fromCodePoint(55304))
} catch {
alert(55304);
} try{
encodeURIComponent(String.fromCodePoint(55305))
} catch {
alert(55305);
} try{
encodeURIComponent(String.fromCodePoint(55306))
} catch {
alert(55306);
} try{
encodeURIComponent(String.fromCodePoint(55307))
} catch {
alert(55307);
} try{
encodeURIComponent(String.fromCodePoint(55308))
} catch {
alert(55308);
} try{
encodeURIComponent(String.fromCodePoint(55309))
} catch {
alert(55309);
} try{
encodeURIComponent(String.fromCodePoint(55310))
} catch {
alert(55310);
} try{
encodeURIComponent(String.fromCodePoint(55311))
} catch {
alert(55311);
} try{
encodeURIComponent(String.fromCodePoint(55312))
} catch {
alert(55312);
} try{
encodeURIComponent(String.fromCodePoint(55313))
} catch {
alert(55313);
} try{
encodeURIComponent(String.fromCodePoint(55314))
} catch {
alert(55314);
} try{
encodeURIComponent(String.fromCodePoint(55315))
} catch {
alert(55315);
}