The difference between encodeURI()
and encodeURIComponent()
are exactly 11 characters encoded by encodeURIComponent but not by encodeURI:
I generated this table easily with console.table in Google Chrome with this code:
var arr = [];_x000D_
for(var i=0;i<256;i++) {_x000D_
var char=String.fromCharCode(i);_x000D_
if(encodeURI(char)!==encodeURIComponent(char)) {_x000D_
arr.push({_x000D_
character:char,_x000D_
encodeURI:encodeURI(char),_x000D_
encodeURIComponent:encodeURIComponent(char)_x000D_
});_x000D_
}_x000D_
}_x000D_
console.table(arr);
_x000D_