Using delphi 7 with PG 8.4 Database configuration:
ENCONDING: UTF8
LC_COLLATE: Portuguese, Brazil
LC_CTYPE: Portuguese, Brazil
When ApplyUpdates(0) with caract, return error:
SQL Server Error: invalid byte sequence for encoding "UTF8": 0xd652
how to fix it ?
I'm using DBXCONNECTIONS.INI for configure.
Please
Thanks
UTF 8 error
The problem is that dbExpress driver uses "UTF8" encoding by default. To solve your issue you should set correct charset for your TSQLConnection.
You can use two ways to define charset:
1. To define charset charset as it is described in the "Readme.html" file:
const
coCharset = TSQLConnectionOption(204);
do it in the AfterConnect event of TSQLConnection:
SQLConnection1.SQLConnection.SetOption(coCharset, Integer(PChar('Your_CharSet')));
2. Set the parameter in the Params property of TSQLConnection component or in the "DBXCONNECTIONS.INI" file:
ServerCharSet=Your_CharSet
You can use two ways to define charset:
1. To define charset charset as it is described in the "Readme.html" file:
const
coCharset = TSQLConnectionOption(204);
do it in the AfterConnect event of TSQLConnection:
SQLConnection1.SQLConnection.SetOption(coCharset, Integer(PChar('Your_CharSet')));
2. Set the parameter in the Params property of TSQLConnection component or in the "DBXCONNECTIONS.INI" file:
ServerCharSet=Your_CharSet