Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a database which contain many name with combination of those characters. Once i will reload them, they will become public web url.

So that visitor if open this url (its valid??): http://www.example.com/&*Ö::

It will land to a unique page. But do you really allow those characters? Or filter them. Or there is no rule really, anything is allowed.

(I can already see, http://webmasters.stackexchange.com/questions/23964/how-to-allow-nonsense-characters-as-web-url-for-example-and-more, skiped my special characters and only took "and more". Is that the standard? I mean you can delete the main character?)

share|improve this question

2 Answers 2

You can allow any character in URLs but it is not a good idea.

for example

%2F is the "percent-encoded" version of "/" that is a special character

the common practice is use the UTF-8 encoding for the URLs, because it is Unicode based and it is backward compatible with ASCII (basic US characters)

as I said it is not a good idea allowing all characters. You can allow a big set of characters, but not all Some are potentially dangerous like the %00 null character

I use to allow letters of any alphabet (including as example ùàòè), numbers, some symbols like -_.+

I hope this helps!

share|improve this answer
    
%2F is a slash, not a "jolly" character, which I believe refers to an asterix (*). –  Lèse majesté Dec 31 '11 at 8:48
1  
sorry this was a translation problem, in Italian we use to mark "jolly" any different from normality... correcting :) –  Obi Wan Wesabi Dec 31 '11 at 16:39
    
You could be right. I'd actually never heard that term before until now and had to google it. I saw it used to refer to the asterix, but who knows... =] –  Lèse majesté Dec 31 '11 at 18:20

If you are using the ISO-8859-1 character set, then you can use the following table for reference. You just simply use Entity Name or Entity Number.

HTML ISO-8859-1

EDIT: just re-read your question, am not sure how you can 'convert' the characters directly from your DB to allow browsers to read it correctly.

According to rfc1738 (page 2), unsafe characters should always be encoded. So a direct answer to your question would be, no it should not be allowed.

share|improve this answer
    
But the name is associated with Company or Associations or etc unfortunately and they would be annoying to include as web url because, normal human being wont type those abnormal characters while they open any url or search for any url. –  YumYumYum Dec 30 '11 at 10:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.