after encoding URL with urlencode() , did u decode it by urldecode on output?
PHP Code: 
<?php
//$_GET[fileName]  == Q%26A.jpg
$fileName $_GET[fileName];
echo 
urldecode($fileName);
?>
Edit : My bad urdecode is bad thing :/ thanks for reminding me out