Welcome Guest, Not a member yet? Register   Sign In
CharacterSet mismatch
#1

We are trying to migrate to PHP 7 which involves changing the driver for the database to sqlsrv as opposed to mssql. Here is what the configuration for the database looks like:

PHP Code:
$db['default']['hostname'] = '192.168.3.55,53627';
$db['default']['username'] = '[username]';
$db['default']['password'] = '[password]';
$db['default']['database'] = "users";
$db['default']['dbdriver'] = 'sqlsrv';
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = TRUE;
$db['default']['cachedir'] = "";
$db['default']['dbcollat'] = 'sql_latin1_general_cp1_ci_as';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
$db['default']['char_set'] = 'utf8'

The problem is that all characters that are beyond the ASCII character set display as gibberish. With PHP 5 and the mssql driver there was an option to set the character set to 'windows-1252'. But this does not seem to be an option any more. what should the character set be? setting the character set (char_set) to 'utf8' makes it so that there are no database errors but characters are not translated correctly.
Reply


Messages In This Thread
CharacterSet mismatch - by rkb - 09-13-2017, 02:00 PM
RE: CharacterSet mismatch - by InsiteFX - 09-14-2017, 03:43 AM
RE: CharacterSet mismatch - by rkb - 09-14-2017, 06:03 AM
RE: CharacterSet mismatch - by InsiteFX - 09-14-2017, 08:59 AM
RE: CharacterSet mismatch - by rkb - 09-14-2017, 10:57 AM
RE: CharacterSet mismatch - by Narf - 09-15-2017, 01:38 AM
RE: CharacterSet mismatch - by rkb - 09-15-2017, 07:06 AM
RE: CharacterSet mismatch - by Narf - 09-15-2017, 01:36 AM
RE: CharacterSet mismatch - by Narf - 09-15-2017, 07:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB