[eluser]jstuardo[/eluser]
Hello...
I have an encoding problem now.
Well, I have spanish characters stored in a database. When I retrieve data, they are shown in an encoding similar to UTF-8. I write "similar" because when I use UTF-8 encoding in the HTML page, the characters aren't shown correctly.
I have this configuration now:
Code:
$config['charset'] = "ISO-8859-1";
and this is inside the HEAD tag of the page:
Code:
$meta = array(
array('name' => 'robots', 'content' => 'no-cache'),
array('name' => 'description', 'content' => $evento->nombre),
array('name' => 'keywords', 'content' => $evento->nombre . ', ' . $evento->palabras_clave),
array('name' => 'Content-type', 'content' => 'text/html; charset=iso-8859-1', 'type' => 'equiv')
);
<?php echo meta($meta)?>
Well, I am executing this query:
Code:
$sql = 'select lp.id,
c.nombre as nombre_comuna,
lp.nombre as nombre_lugar,
lp.direccion
from lugar_pago lp, lugar_pago_x_evento lpxe, comuna c
where lpxe.lug_id = lp.id and
c.id = lp.com_id and
lp.activo = 1 and
lpxe.eve_id = ?';
The nombre_comuna field contains the string "Ñuñoa" and it was correctly stored because I use MySQL Query Browser to see the data. But when I return the data using:
Code:
$query = $this->db->query($sql, array('id' => $id));
return $query->result();
The following string is shown in the page: Ñuñoa
Any help will be greatly appreciated
Thanks
Jaime