Skip to content Skip to sidebar Skip to footer

Encode Uri (spaces Etc.), Without Encode Non-ascii Characters

When I use escape/encodeURI/encodeURIComponent to encode URI, it's encoding special characters (like '? [ ] &' ), and all non-ASCII characters. I prefer the link to look like

Solution 1:

  1. Yes.
  2. No.

In http://www.w3.org/Addressing/URL/5_BNF.html one can read:

The "national" and "punctuation" characters do not appear in any productions and therefore may not appear in URLs.

Post a Comment for "Encode Uri (spaces Etc.), Without Encode Non-ascii Characters"