Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

Special characters and their output (utf-8)

$
0
0
I struggle with the problem that special characters (Ö, Ü, Ä, ß) are not output correctly. I have check these points:

- <meta charset="utf-8">
- $config['charset'] = 'UTF-8';
- database: utf8_unicode_ci


I have already written a function, that works even with normal output:

PHP Code:
function utf8_ausgabe ($str) {
    
    return 
mb_convert_encoding($str'HTML-ENTITIES''utf-8');


[Image: cn1.jpg]

... but in form inputs, it doesn't work. Of course, as well as the '&' is converted.

without convert function:
[Image: cn2.jpg]
with convert function:
[Image: cn3.jpg]

Do you have a solution for this?

Thanks in advance Blush

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>