Reputation: 548
yii framework for php $this->redirect()
function works great, it can redirect to external links, but when I useæ, ø, å
characters in string, they are wrongly shown in the final url after redirect.
$this->redirect ("http://test.com?name=børing");
will redirect me to a page
test.com?name=børing
Help me to fix this issue
Upvotes: 0
Views: 189
Reputation: 548
So, i combined @zazu suggestion and first answer and this:
urlencode(utf8_decode($url));
Worked for me.
Upvotes: 0
Reputation: 5094
try this
$this->redirect("http://test.com?name=" . urlencode("børing"));
Upvotes: 1