Link to home
Start Free TrialLog in
Avatar of numbers1to9
numbers1to9

asked on

URI/address; non English/standard characters.

Hi my humble serve-eh--friends!

I was wondering how to make Apache show non English/standard in the URI location bar.

Example 1: the address http://www.example.com/x z y becomes http://www.example.com/x%20z%20y.

-- How do you remove the %20 and make Apache show ordinary spaces?

Example 2: the address http://www.example.com/å becomes http://www.example.com/%E5.

-- How do you remove the %E5 and make Apache show å?

I know you can make colons (:) show in the URI, and that some web-services have support for non-English characters in their domain name. Surly what I am asking for cant be to much to ask for? If you ask me.
Avatar of paradoxengine
paradoxengine
Flag of Italy image

IIRC, domain names can only have standard english characters, and Apache will answer only URL encoded queries (actually the user's browser will encode the query automatically).
Avatar of numbers1to9
numbers1to9

ASKER

Hmm... I don't think I like your answer... Are you saying it can not be done? If your saying that then I DEFINITIVELY do not like your answer. Please try again... Don't make me cry.

Seriously, there must be a way to do this? No? What about just rewriting the %E5 to, maybe "(swe-a)", or space to "(space)". That should surly be possible? Yes?

5 more shiny shiny points for the lucky one that could nail this question!


Avatar of Guy Hengel [angelIII / a3]
the <space> to %20 is indeed the web browser that does this, long before even the request reaches your apache server.
any application has to be aware of that, and act upon that.
in php, for example, you have the function urldecode:
http://www.php.net/urldecode
that would return the space back from the %20.
angellll: do you mean:

1. the user writes e.g. "<space>" somewhere in the address bar.
2. the character is converted by the browser to %20.
3. the urldecode can be used to transform the %20 to "<space>" so that PHP can interprets the character correctly?
4. In the address bar it would still be "%20".

Have I understood you correctly?

NOT SO IMPORTANT ================================
How come some domain names can support non-English characters? (I read a little about it, and if I remember correctly, they use some new DNS stuff -- nothing that could be [ab]used for what I am thinking about?

IMPORTANT ======================================
And if I have understood both of you correctly there is no way to bypass this, because the "problem" is on the user agent (the browser) not Apache?
================================================

ALSO IMPORTANT ==================================
What about rewriting "%20" to "(space)" is that possibly? Could it be done with "a simply" (read hours of hours of work time) htaccess rewrite???

ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I see... Well, guess I have to dust of the old htaccess file and lose my hair prematurely...

Say... You don't happen to have a working example around--say, for Apache 2++? That would be swell... Just... You know--Gold. Super. Yeah... Good. Mmmmm... Yes.... Oh-yes...

REGARDING NON-ENGLISH DOMAIN NAMES =================================
I do not have any examples out of the blue. I have only seen one site (a friends site) using a non-English character, but that was a very long time ago. And I don't remember if I actually saw the working address or if my friend told me about it. For that matter, I do not remember if that was my friend, or if I even actually talked to a real person.

Although, I recently stumbled upon a ISP that had such a service (it was there I read a little bit more about non-English characters in the domain name). If you want I can try to dig up something (a working example, or the ISP site).

I don't use htaccess actually, so I have not samples...

in regards to the other issue, you might find this one interesting:
http://www.idnnow.com/index.jsp
>I don't use htaccess actually, so I have not samples...
Well, thank you anyway.

>in regards to the other issue, you might find this one interesting:
http://www.idnnow.com/index.jsp

Thanks!