xdenser / node-firebird-libfbclient

Firebird SQL binding
MIT License
82 stars 34 forks source link

Add charset options lc_type and lc_decode to createConnection #95

Closed mjschutz closed 5 years ago

mjschutz commented 5 years ago

Hi.

I made changes to support options on createConnection to change lc_type and a lc_decode function to decode the result buffer to string. Example:

let connection = Firebird.createConnection({ lc_type: 'WIN1252', lc_decode: (data) => iconv.decode(data, 'windows-1252') });

I run tests here and the code is working fine (node 12), this will probably resolve the issues #9 and #87

mjschutz commented 5 years ago

I will check the problem with the assync version of connection, and commit a fix.