I use the UrlEncode in my .htAccess files with PHP and MySql.
$Data .= 'RewriteRule '.formatURL_htaccess(regionId2Name_htaccess($rRow["id"])).'/'.formatURL_htaccess($vRow["ville"]).'/$ /villes.php?region='.$rRow["id"].'&ville='.urlencode($vRow["ville"]).' [L]
The variable $_GET['ville'] is UrlEncode. This variable content cities like "Ayer's Cliff". The cities that have apostrophes in it are showing like this "Ayer7s Cliff" in the target page. The UrlEncode is encoding the " ' " with %27 and that is normal but why in the target page it's show the " 7 " ?
All other code are ok.