When you're working with files that you think are in UTF-8 it's worth checking that whatever editor you used is actually using UTF-8 to save the files.
When you use encodeURIComponent it will encode the character in to a safe representation for use in URLs, if you are then using decodeURIComponent on a page with the same encoding as where the character was encoded in the first place, it should decode back in to the correct character. If however, you decode it on a page with a different encoding, you might not get the correct character back.
For example, if you had this code on the same (UTF-8 encoded) page:
console.log(encodeURIComponent("à")); // "%C3%A0"
console.log(decodeURIComponent("%C3%A0")); // "à"
You should see the correct output from these functions. If however you were to change the encoding, results might be different.
Hope this helps.