Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Project: node-firebird
// Definitions by: Marco Warm <https://github.com/MarcusCalidus>

declare module 'node-firebird' {
declare module 'node-firebird-dev' {
type DatabaseCallback = (err: any, db: Database) => void;

type TransactionCallback = (err: Options, transaction: Transaction) => void;
Expand Down
12 changes: 6 additions & 6 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ exports.escape = function(value) {
};

const
DEFAULT_ENCODING = 'utf8',
DEFAULT_ENCODING = 'latin1',
DEFAULT_FETCHSIZE = 200;

const
Expand Down Expand Up @@ -3733,7 +3733,7 @@ Connection.prototype.attach = function (options, callback, db) {
blr.pos = 0;

blr.addByte(1);
blr.addString(isc_dpb_lc_ctype, 'UTF8', DEFAULT_ENCODING);
blr.addString(isc_dpb_lc_ctype, 'ISO8859_1', DEFAULT_ENCODING);
blr.addString(isc_dpb_user_name, user, DEFAULT_ENCODING);
blr.addString(isc_dpb_password, password, DEFAULT_ENCODING);

Expand Down Expand Up @@ -3812,8 +3812,8 @@ Connection.prototype.createDatabase = function (options, callback) {

blr.pos = 0;
blr.addByte(1);
blr.addString(isc_dpb_set_db_charset, 'UTF8', DEFAULT_ENCODING);
blr.addString(isc_dpb_lc_ctype, 'UTF8', DEFAULT_ENCODING);
blr.addString(isc_dpb_set_db_charset, 'ISO8859_1', DEFAULT_ENCODING);
blr.addString(isc_dpb_lc_ctype, 'ISO8859_1', DEFAULT_ENCODING);
blr.addString(isc_dpb_user_name, user, DEFAULT_ENCODING);
blr.addString(isc_dpb_password, password, DEFAULT_ENCODING);

Expand Down Expand Up @@ -4520,7 +4520,7 @@ Connection.prototype.svcattach = function (options, callback, svc) {
blr.pos = 0;

blr.addBytes([isc_dpb_version2, isc_dpb_version2]);
blr.addString(isc_dpb_lc_ctype, 'UTF8', DEFAULT_ENCODING);
blr.addString(isc_dpb_lc_ctype, 'ISO8859_1', DEFAULT_ENCODING);
blr.addString(isc_dpb_user_name, user, DEFAULT_ENCODING);
blr.addString(isc_dpb_password, password, DEFAULT_ENCODING);
blr.addByte(isc_dpb_dummy_packet_interval);
Expand Down Expand Up @@ -4636,7 +4636,7 @@ Connection.prototype.queEvents = function(events, eventid, callback) {
// prepare EPB
blr.addByte(EPB_version1);
for (var event in events) {
var event_buffer = new Buffer(event, 'UTF8');
var event_buffer = new Buffer(event, 'ISO8859_1');
blr.addByte(event_buffer.length);
blr.addBytes(event_buffer);
blr.addInt32(events[event]);
Expand Down