Page 1 of 1

special characters in url?

PostPosted: 28. December 2008 22:59
by CheatCat
There is anyway to enable usage of special characters (like åäö) in the url? If I have a file called "Gästbok.php" and try to open it on Internet Explorer I get errors... :(

Re: special characters in url?

PostPosted: 29. December 2008 00:26
by Nobbie
Special characters in URLs have to be "url encoded" before passed to the browser. See http://www.w3schools.com/TAGS/ref_urlencode.asp for example and test.

BUT: it is anyway a very very bad idea to call a script (or file) "Gästbook", as it is impossible to determine which character set is used on the webservers file system (utf8, latin etc.). Due to that problem a HTTP Request for a filename including such special chars may fail anyway, even if the URL seems to be encoded correctly.

Therefore you really *should* rename your script to "guestbook.php" or "gastbok.php" or similar. Otherwise some browswer will successfully open and others will fail to open that file. The behaviour is unpredictable.

Re: special characters in url?

PostPosted: 29. December 2008 13:14
by CheatCat
Okey, I should change the filename. Thanks! :)