Welcome Guest, Not a member yet? Register   Sign In
Problems with chinese characters
#2

[eluser]Unknown[/eluser]
I have the same problem.
I already use the latest version of CI.
I used odbc to connect mssql

db['default']['hostname'] = "Driver={SQL Server};Server=xxxx;Database=LunchDB;AutoTranslate=yes";
$db['default']['username'] = 'sa';
$db['default']['password'] = 'xxxxx';
$db['default']['database'] = 'LunchDB';
$db['default']['dbdriver'] = 'odbc';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

When I run the following sql, the record shows ????. However, it should be chinese characters.
$this->db->select("Lunch_Day1_SetA_ch as day1_a");
$this->db->from("Lunch");
$query = $this->db->get();
if ($query->num_rows() < 1) {
log_message("debug","No lunch record");
return FALSE;
}
$this->menu_records = $query->row();

How to solve it?



Messages In This Thread
Problems with chinese characters - by El Forum - 03-06-2012, 08:50 AM
Problems with chinese characters - by El Forum - 03-07-2012, 10:49 PM
Problems with chinese characters - by El Forum - 03-08-2012, 01:16 AM
Problems with chinese characters - by El Forum - 06-10-2013, 11:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB