URL encoding of en-dash I had a link:



www.example.com/issues/issue-week-2012–2013/poem1


But it is encoded as:

www.example.com/issues/issue-week-2012%25E2%2580%25932013/poem1


This is an URL alias, the en-dash (between "2012" and "2013") is encoded as %25E2%2580%2593, which shows a 404 error. But when I removed the "25" after each % in the URL manually it works.

Please tell me about the issue?
I think there may be a solution using a RewriteRule in .htaccess.

Imagine I have the url /some-page

Now if I go to /someTESTpage

and I put this in .htacess:

RewriteEngine on
RewriteRule ^(.*)TEST(.*)$ /$1-$2 [L,R=301]


Then it redirects to: 

/some‒test


Problems still to solve:

1) In the redirect URL that is an en-dash so is still the wrong url. Not sure how to get it to insert the correct character.

2) When I put a percentage sign in the string to be replace the whole thing stops working. Not sure how to escape a percentage sign in a RewriteRule.