File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 66
77class Connector extends SqlServerConnector
88{
9- //
9+ public function connect (array $ config )
10+ {
11+ $ options = $ this ->getOptions ($ config );
12+
13+ $ connection = $ this ->createConnection ($ this ->getDsn ($ config ), $ config , $ options );
14+
15+ if (array_key_exists ('charset ' , $ config ) && $ config ['charset ' ] != '' ) {
16+ $ connection ->prepare ("set char_convert ' {$ config ['charset ' ]}' " )->execute ();
17+ }
18+
19+ $ this ->configureIsolationLevel ($ connection , $ config );
20+
21+ return $ connection ;
22+ }
1023}
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ protected function defineEnvironment($app)
4848 'database ' => env ('DB_DATABASE ' , 'forge ' ),
4949 'username ' => env ('DB_USERNAME ' , 'forge ' ),
5050 'password ' => env ('DB_PASSWORD ' , '' ),
51- // 'charset' => 'utf8',
51+ 'charset ' => 'utf8 ' ,
5252 'prefix ' => '' ,
5353 'prefix_indexes ' => true ,
5454 'options ' => array (\PDO ::ATTR_ERRMODE => \PDO ::ERRMODE_EXCEPTION )
You can’t perform that action at this time.
0 commit comments