Reputation: 183
I am using CodeIgniter
to build my queries and one of the fields that I am importing is something like:
textØ=125mm
The insert/update is always successful but it is appearing in the table as:
text??=125mm
How can I get around this?
Upvotes: 1
Views: 1561
Reputation: 45
Try this one in controller or view:
header("Content-Type: text/html; charset=UTF-8")
Upvotes: 0
Reputation: 1150
check your database.php
config file and make sure it has the value :
$db['development']['char_set'] = 'utf8';
$db['development']['dbcollat'] = 'utf8_general_ci';
Upvotes: 1
Reputation: 2484
If you are in MySQL change the Collation of database to
utf8_general_ci
. And yes, Be sure to check the character encoding of your HTML Page. i.e, use a META TAG at the head part
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Upvotes: 0