[eluser]Juzt1s[/eluser]
Here is updated and more clear explanation:
The problem I am having is that when I get data out of database everything is fine, but when I write data with special symbols to database I get special symbols coded.
ex. When I write name (1.5), ie I get the name ( 1.5 & # 4 1 ; , ie (without spaces). But when I get from database base everything is fine and name (1.5), ie is shown.
The problem is that my search with special symbols does not work.
here are the configurations. database.config:
Code:
$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = 'xx.xx.x.xxx';
$db['default']['username'] = 'sa';
$db['default']['password'] = 'password';
$db['default']['database'] = 'database';
$db['default']['dbdriver'] = 'mssql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'latin1';
$db['default']['dbcollat'] = 'latin1_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
as you've noticed my database collation is SQL_Latin1_General_CP1_CI_AS.
I've tried setting values to:
Code:
$db[‘default’][‘char_set’] = ‘utf8’;
$db[‘default’][‘dbcollat’] = ‘utf8_general_ci’;
and:
Code:
$db[‘default’][‘char_set’] = ‘utf16’;
$db[‘default’][‘dbcollat’] = ‘utf16_general_ci’;
Any ideas how to write data with special symbols or have my search working. The search is simple, I get string, put it in SQL LIKE statement and return the values.