hgourvest / node-firebird

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

Suport DEFAULT_ENCODING latin1 #283

Open FabianoCastro opened 1 year ago

FabianoCastro commented 1 year ago

Hello, when I get data with accent in Portuguese it comes with incorrect characters, but if I change the DEFAULT_ENCODING from "utf8" to "latin", directly in index.js, it works 100%.

If it is possible to have a configuration for this, so I don't have to change it every time I update the sources, I would be very grateful ;).

Another detail, I include the charset "WIN1252" in the SupportedCharacterSet type list, as it does not exist.

rhengles commented 1 year ago

I normally don't post just to one-up, but this time I want to say: Same here!

rickdroio commented 1 year ago

Dear @FabianoCastro your request just save me :)

I've updated index.js to follow, worked like a charm!

DEFAULT_ENCODING = 'latin1'

Please node-firebird team, create a param to change it on constructor!

FabianoCastro commented 1 year ago

Great

b-runo commented 1 year ago

Someone can solve this? using the options.encoding = 'WIN1252' or options.encoding = 'latin1' dont work for me :(

FabianoCastro commented 1 year ago

Hi,

Change the const

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

At line 889 in file indes.js

b-runo commented 1 year ago

You save my life Bro, i lose a entire day trying to solve this.

braaar commented 4 months ago

Fixing this would solve:

mateusvieites commented 4 months ago

Fixing this would solve:

338

I think i made a solution

FabianoCastro commented 4 months ago

Updating....

Version 1.1.8

image