Welcome Guest, Not a member yet? Register   Sign In
permitted_uri_chars - will this work?
#1

[eluser]tsisson[/eluser]
Hi there!

I'm using utf-8 in my while application. In order to use umlauts in my urls I changed the permitted_uri_chars to the following:

Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_+\-äöüß';

This allows the '+' and umlauts. It works in my local setup, but will it work on servers? Not sure if using umlauts in urls is a good idea ... What do you think? What are the alternatives?

tsisson
#2

[eluser]gtech[/eluser]
Here is a post on the topic, from what I have read umlauts are handled differently when a link is clicked on in some browsers so may be a good idea to avoid using them.

[url="http://www.webmasterworld.com/forum13/2134.htm"]http://www.webmasterworld.com/forum13/2134.htm[/url]
#3

[eluser]tsisson[/eluser]
Hmm, okay. Thank you so far.

But what's the correct way to encode the umlauts? I already experimented a lot with urlencode() and utf8_encode() but I'm not getting it right.

Code:
$query ='ö';
echo urlencode($query);

gives me the supposed ö. But using

Code:
$query ='ö';
redirect('results/'.urlencode($query).'/');

gives mit an url with results/ö/




Theme © iAndrew 2016 - Forum software by © MyBB