xdenser / node-firebird-libfbclient

Firebird SQL binding
MIT License
82 stars 34 forks source link

Especial Characteres #87

Open gmferreir1 opened 5 years ago

gmferreir1 commented 5 years ago

special characters are appearing with � words with the letters ç é º how to solve this problem

mreis1 commented 5 years ago

I have a similar issue, but as far as I know, this only impacts me in currency symbols such as €. For example: I'm able to retrieve information stored as follows: SALºÓòéç'N exactly the same way in UTF8 (Database ISO8859-1).

But when I request the € symbol, I receive a non representative symbol in UTF8. If I convert that symbol to hex I get 'c2 80'

Buffer.from('c280','hex').toString() gives me ' ' Then I tried to use iconv. iconv.decode(Buffer.from(currency.symbol, 'utf8'), 'WINDOWS-1252') where currency.symbol is actually the value received from the database. The conversion results in: € Close but not correct enough. I can't understand why there's an extra 'c2' at the beginning of the field value. ANSI represents € as 0x80.

Here are some screenshots.

image

image

image

xdenser commented 5 years ago

I think here the problem either in libfbclient or in nodejs. I do not do any special charset conversions....

mreis1 commented 5 years ago

@xdenser Thank you for the clarification 👍

mjschutz commented 4 years ago

I guess this is related to #9