Welcome Guest, Not a member yet? Register   Sign In
Special character insert into mssql
#8

[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.


Messages In This Thread
Special character insert into mssql - by El Forum - 11-16-2012, 06:35 AM
Special character insert into mssql - by El Forum - 11-16-2012, 06:44 AM
Special character insert into mssql - by El Forum - 11-16-2012, 06:58 AM
Special character insert into mssql - by El Forum - 11-16-2012, 07:01 AM
Special character insert into mssql - by El Forum - 11-16-2012, 07:15 AM
Special character insert into mssql - by El Forum - 11-16-2012, 07:58 AM
Special character insert into mssql - by El Forum - 11-16-2012, 08:20 AM
Special character insert into mssql - by El Forum - 11-19-2012, 01:51 AM
Special character insert into mssql - by El Forum - 11-19-2012, 02:20 AM
Special character insert into mssql - by El Forum - 11-19-2012, 03:13 AM
Special character insert into mssql - by El Forum - 11-19-2012, 03:40 AM
Special character insert into mssql - by El Forum - 11-19-2012, 03:47 AM
Special character insert into mssql - by El Forum - 11-19-2012, 03:59 AM
Special character insert into mssql - by El Forum - 11-19-2012, 04:18 AM
Special character insert into mssql - by El Forum - 11-19-2012, 04:25 AM
Special character insert into mssql - by El Forum - 11-19-2012, 07:22 AM
Special character insert into mssql - by El Forum - 11-19-2012, 07:31 AM
Special character insert into mssql - by El Forum - 11-19-2012, 07:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB