laravel-db2 icon indicating copy to clipboard operation
laravel-db2 copied to clipboard

set default charset ?

Open Yornletard opened this issue 3 years ago • 1 comments

Hi, this is not an issue, but a question about config : Is there a way to set charset in connection (config/database.php)? I'm getting array of object from a query with some values like this : 1 => {#513 +"label": b"verre 41 cl" +"code": "456987" +"brand": "20" }

"b" prefix before label "verre 41 cl" stand for "binary", which has to be decoded.

thanks

Yornletard avatar Dec 06 '21 12:12 Yornletard

You can modify the CCSID value in the odbc_keywords array, see also https://www.ibm.com/support/knowledgecenter/SSLTBW_2.3.0/com.ibm.zos.v2r3.idad400/ccsids.htm.

Our data in de database is ISO-8859-1, but the clients need the data in UTF8. To accomplish this we modified the de DB2 processor configuration. See https://github.com/cooperl22/laravel-db2/pull/80.

jonkerw85 avatar Dec 22 '21 08:12 jonkerw85