node-firebird
node-firebird copied to clipboard
Insert data with charset NONE (or ISO8859_1)
Hello, I am working with an old firebird DB which is encoded in NONE charset. This is bad practise, but this is an old system that has to be interfaced with something new.
The node-firebird seems to always connect to the DB with utf8.
Is there any way to force the firebird DB connection and query with NONE charset / encoding ? Or with ISO8859_1 ? Note that adding _NONE or _ISO8859_1 in the insert sql query does not change the fact that the strings are always encoded as utf8, it has no effects.
I really need this feature because the old firebird DB is used by an old application which uses the NONE charset encoding. Any insert made by the node application is wrongly encoded in utf8 and then badly displayed in the old application. NB: even though the old application encode the data as "NONE", it seems to use latin1 decoding to present the data.
I hope that I am not going to be forced to dismiss the node-firebird package for a Unix type ODBC package which should allow me to make queries with the special NONE charset.
Any help or suggestion would be greatly appreciated.
I was able to work with a database as you describe but in a limited way. It retrieved quite a lot of read-only data but did insert notes ok. Had to use a function to convert from a buffer to string and vice-versa (see wiki) HTH Tom
I have the same problem. Reading is not really a problem because I can convert the buffer to the correct string. But how to handle inserts with parameters?
Thanks to Roeland's pull request #165, it makes it possible to work with a DB that has a NONE charset. That is great !