Welcome Guest, Not a member yet? Register   Sign In
Various symbols issue
#1

[eluser]Unknown[/eluser]
Hi everyone,

I recently switched to CodeIgniter 2.0 and since then I have some trouble with utf8 encoding.
I use a utf8 database, and the utf8_helper.

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Rewrite all outgoing text into UTF8 compatible streams
* Author: Matt Carter <[email protected]>
* Info: http://hash-bang.net/2009/02/utf8-with-codeigniter
*/
function ob_utf8($string) {
    return utf8_decode($string);
}
ob_start('ob_utf8');

foreach ($_POST as $key => $val) // Re-write all incoming text into UTF8 streams
    $_POST[$key] = utf8_encode($val);
?&gt;

I have no problems with accented characters like 'àéè' but I can't display symbols like € or ß

I tried to utf8_encode or utf8_decode strings but I always have �?� �? characters instead.

My page charset is utf8.




Theme © iAndrew 2016 - Forum software by © MyBB