I have url http://localhost/my_project/welcome/special_chars/äöü Now I am trying to print last segment using echo utf8_decode($this->uri->segment(3)); I am not getting the original value but when I write print like echo utf8_decode('äöü'); then I am getting proper value.
I think its something to do with permitted_uri_characters setting in the config. You need to add your special character in the config like
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_()@&\-!';
For more info please refer this link: How do you allow URI encoded characters in CodeIgniter URLs?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.