Welcome Guest, Not a member yet? Register   Sign In
How to UTF-8 Encode an URI?
#11

[eluser]developer10[/eluser]
[quote author="Derek Allard" date="1247591834"]I'd advise you to not use those characters in your controller names or URL structures. If you need to pass them around, its safest to do so with urlencode.[/quote]

i didnt plan using them in my controller names or function names, only in parameters

if so, it's better to use them like this:
č -> as c
ć -> also as c
š -> as s
đ -> as d or even dj
ž -> as z

instead of having them encoded, since any of them will be converted to some ugly characters,
which wont make my urls to be user friendly (and that was what i wanted to achieve)

but the problem with this solution is that i cant simply pass them as parameters with characters replaced and expect them
to work correctly (i could try to restore original characters, but HOW to know which charaters are right to replace?!?)

seems like Mission:Impossible
#12

[eluser]Cro_Crx[/eluser]
This might be helpful for anyone who comes across this topic in the future.
WC3 Specifications for URL's http://www.w3.org/Addressing/URL/url-spec.txt.
The document is quite long, so if you want the clifnotes, it goes something like this:


1) Reserved: ; / ? : @ & = + $ ,
These characters delimit URL parts. If you want to use any of these characters, you must escape them

2) Unreserved: alphanum - _ . ! ~ * ' ( )
These characters have no special meaning and can be used as is. Browsers don't escape these characters

3) Excluded: control characters, space, < > # % ", { } | \ ^ [ ] `
#13

[eluser]developer10[/eluser]
as a matter of fact, i'm using these characters in URLs on live version (non CI) of the site i'm rebuilding

such URLs are urlencoded, but are visible as normal (with the characters) in google results

a minute ago i tried to copy and paste here such a url but it appeared here encoded (not as in address bar)

im totally confused on this, too bad there's nobody here that has some experience with this issue




Theme © iAndrew 2016 - Forum software by © MyBB