hgourvest / node-firebird

Pure javascript and asynchronous Firebird client for Node.js.
Mozilla Public License 2.0
256 stars 128 forks source link

encoding WIN1252 dont work as expected #311

Open b-runo opened 1 year ago

b-runo commented 1 year ago

Im using options.encoding = 'WIN1252' to try retrieve column 'ENDERECO' from my database that contains special characters like "cuiába", very common here in Brazil.

But when i use the regular select: database.query("SELECT ENDERECO FROM CONTATOS"). This return weird character like "cui�ba".

Just work when i use CAST() inside select like: database.queryAsync("SELECT cast(ENDERECO as varchar(100) character set win1252) FROM CONTATOS")

But i have to many colmuns to do this way, someone know how to solve this?.

mateusvieites commented 7 months ago

In "index.js" from node-firebird. DEFAULT_ENCODING='latin1'

nickolasdeluca commented 3 months ago

I've requested the option to set the default encoding to latin1 dinamically on issue #336