次のコードは、漢字を含む area_name を返すために使用されます。
public function get_area_name($area_id)
{
$this->db->select("*");
$this->db->from("area");
$this->db->where("area_id", $area_id);
$query = $this->db->get();
$obj_area = $query->_fetch_object();
return $obj_area->area;
}
コードに続く別の関数では、戻り値が取得され、壊れた文字が返されます。
$area = $this->get_area_name($area_id);
database.php では、以下のように config を設定しています。
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
PHPファイルで問題が発生したため、htmlヘッダーにuft-8が設定されていても問題ないと思います。ただし、htmlヘッダーもutf-8で設定されています。