Skip to content

Commit 0aaf6ac

Browse files
andrehankeandrehanke
authored andcommitted
fix: conversion params
1 parent bd93a75 commit 0aaf6ac

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ Update your **config/database.php's** default driver with the settings for the *
4747
return [
4848
...
4949

50-
'sybase' =>
51-
[
52-
'application_encoding' => false,
53-
'application_charset' => '',
54-
'database_charset' => ''
55-
],
5650

5751
'connections' => [
5852
...
@@ -67,7 +61,9 @@ return [
6761
'charset' => 'utf8',
6862
'prefix' => '',
6963
'cache_tables' => true,
70-
'cache_time' => 3600
64+
'cache_time' => 3600,
65+
'application_encoding' => false,
66+
'application_charset' => '',
7167
],
7268

7369
...
@@ -107,18 +103,13 @@ The file is usualy found in **/etc/freetds/freetds.conf**. Set the configuration
107103
## Configuring the charset conversion
108104
This package offers to method to charset conversion, it can be converted in application layer or in database layer, we offered both methods because it can be useful for debugging, to config the application layer conversion you need to set up the following entries on the `database.php` file. You can view an example of the application encoding setup below:
109105

110-
```database
111-
'sybase' =>
112-
[
113-
'application_encoding' => true,
114-
'application_charset' => '',
115-
'database_charset' => ''
116-
],
117106
```
118107
To use the database layer conversion add the property charset to connection configuration on the sybase configuration array
119108
120109
```charset
121110
'charset' => 'utf8',
111+
'application_encoding' => false,
112+
'application_charset' => '',
122113
```
123114

124115

src/Database/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function configureExtraSettings($config = [])
8383
throw new \Exception('When application encoding is configured, you need to set up application_charset and database_charset');
8484
}
8585
$this->applicationCharset = $config['application_charset'];
86-
$this->databaseCharset = $config['database_charset'];
86+
$this->databaseCharset = $config['charset'];
8787
}
8888
}
8989

0 commit comments

Comments
 (0)