How to correct URI?
Hello everyone!
How to correct URI? For example I have URI:
http://www.angool.com/search/index.php?query=word word
and I want to have:
http://www.angool.com/search/index.php?query=word+word
How do this? You know some function?
Hello everyone!
How to correct URI? For example I have URI:
http://www.angool.com/search/index.php?query=word word
and I want to have:
http://www.angool.com/search/index.php?query=word+word
How do this? You know some function?
KarateKid,
> What character encoding i should use? It must be uniwersally.
> uniwersally
Patent that word, wuickly. :-)
Do you mean which character encoding should you use for the URI?
It shouldn't make a dot of difference, because a valid URI should only contain "basic" characters less than 128, which all modern encoding's (excluding EBCDIC) inherited from ASCII ... so all characters in a valid URI should be the same no matter which character set you encode it in.
Is that what you where asking?
I didn't know you could even change the character set for get/post.
Cheers. Keith.
Message was edited by: corlettk
In my country (Poland) we have some characters that don't exist in your language. I want to send some words to web dictionary and there is problem - this dictionary change polish characters on other(I don't know from which country). When I send the same characters to polish site it is't the problem. I use UTF-8. Is it UTF-8 guilt?
> In my country (Poland)
Ah. This explains the w.
> we have some characters that
> don't exist in your language. I want to send some
> words to web dictionary and there is problem - this
> dictionary change polish characters on other(I don't
> know from which country). When I send the same
> characters to polish site it is't the problem. I use
> UTF-8. Is it UTF-8 guilt?
Who is doing this changing the characters though? You have no control over what charset the site is using or is expecting.
So. How are you connecting/sending this data? Why do you think that
the site in question will support your characters?
> I didn't know you could even change the character set
> for get/post.
[url=http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLEncoder.html#encode(java.lang.String, java.lang.String)]http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLEncoder.html#encode(java.lang.String, java.lang.String)[/url]
2nd string specifies encoding.
Although the following comment bears noting.
Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilites.
Craney,
I doubt the UTF-8 character encoding is to blame here. I also doubt that foreign websights will (ever) deal with uniquely polish characters... and (forgive me) I really don't think it's reasonable to expect them to.
> When I send the same characters to polish site it is't the problem
I presume that there is no (free) polish dictionary site? Have you looked hard for one?
Yeah, I think you're stuck here, as long as you need the polish characters you're stuck using polish sites.
Keith.