asfernandes / node-firebird-drivers

Node.js Firebird Drivers
MIT License
53 stars 17 forks source link

Charset and invalid characters #48

Closed souzaadriano closed 4 years ago

souzaadriano commented 4 years ago

Hello, I have a little problem, in my queries with the library I have received invalid characters like a : (?).

I believe it is because the database is with default charset "NONE", is there a way to set the same in the connection through the library? how to solve ?

Im using node firebird driver native

asfernandes commented 4 years ago

The best way to solve is to not use NONE in the database.

The driver does not treat it (because it should not exist in good databases).

The driver treat BINARY/OCTETS/VARBINARY as binary data and CHAR/VARCHAR as strings.

JavaScript does not have strings of binary data and that is probably your problem.

souzaadriano commented 4 years ago

Unfortunately for my use this is a problem because it is a legacy database that communicates with many other software, so it is not possible to change the current character set as it would affect other software that works with it.

Thanks for the answer, I'll be finishing the issue.