[patch_done] Problems with accentuation Lazarus 2.7.1
Moderators: gto, EgonHugeist, olehs
Hello Michael,
I created a small example with Zeos and SQLDB, saved in the database the same information. With SQLDB saved normal and Zeos occurred the same problem with the accent.
Attached examples.
Edson
I created a small example with Zeos and SQLDB, saved in the database the same information. With SQLDB saved normal and Zeos occurred the same problem with the accent.
Attached examples.
Edson
You do not have the required permissions to view the files attached to this post.
Last edited by elidorio2 on 15.10.2012, 19:10, edited 1 time in total.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
elidorio2,
well done Edson. Hope they will find the issue. The wrong encoded strings are passed from the FPC DataSets we use. The TPQConnection using the TBufferDataSet so this is completely different.
well done Edson. Hope they will find the issue. The wrong encoded strings are passed from the FPC DataSets we use. The TPQConnection using the TBufferDataSet so this is completely different.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Hi
I made a temporary solution to the UTF8 encoding for FPC 2.7.1.
Now the data is stored in a PostgreSQL database in UTF8 encoding correctly.
I hope that this decision will be made until the FPC team correct the error in the strings.
I'm use:
Lazarus 1.1 r39026 FPC 2.7.1 i386-win32-win32/win64
I made a temporary solution to the UTF8 encoding for FPC 2.7.1.
Now the data is stored in a PostgreSQL database in UTF8 encoding correctly.
I hope that this decision will be made until the FPC team correct the error in the strings.
I'm use:
Lazarus 1.1 r39026 FPC 2.7.1 i386-win32-win32/win64
You do not have the required permissions to view the files attached to this post.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
alexs,
thanks, Alex. I'm willing to point the people to your proposal. But i'm wondering why the escaping functions of postgresql should make this trouble (i got the wrong encoded strings directly from the FPC dataset).
However i hope you understand that we can apply this patch and waiting for the FPC issue.
thanks, Alex. I'm willing to point the people to your proposal. But i'm wondering why the escaping functions of postgresql should make this trouble (i got the wrong encoded strings directly from the FPC dataset).
However i hope you understand that we can apply this patch and waiting for the FPC issue.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
elidorio2,
the SQLDB components using the TBufferDateset, we use the TWideDataSet. Both are suported from the FPC but our dataset is less maintained.
the SQLDB components using the TBufferDateset, we use the TWideDataSet. Both are suported from the FPC but our dataset is less maintained.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
EgonHugeist,
Hi
I continued to look for the problem and found it!
TZPostgreSQLConnection.GetEscapeString function works properly.
The problem in the function TZPostgreSQLStatement.ExecuteUpdate.
The error occurs in an explicit type conversion UTF8String (SQL).
My work code:
if Connection.GetClientCodePageInformations^.Encoding = ceUTF8 then
QueryHandle := FPlainDriver.ExecuteQuery(ConnectionHandle,
{$IF FPC_FULLVERSION>20700}
PAnsiChar(SQL))
{$ELSE}
PAnsiChar(UTF8String(SQL)))
{$ENDIF}
else
QueryHandle := FPlainDriver.ExecuteQuery(ConnectionHandle,
PAnsiChar(AnsiString(SQL)));
Hi
I continued to look for the problem and found it!
TZPostgreSQLConnection.GetEscapeString function works properly.
The problem in the function TZPostgreSQLStatement.ExecuteUpdate.
The error occurs in an explicit type conversion UTF8String (SQL).
My work code:
if Connection.GetClientCodePageInformations^.Encoding = ceUTF8 then
QueryHandle := FPlainDriver.ExecuteQuery(ConnectionHandle,
{$IF FPC_FULLVERSION>20700}
PAnsiChar(SQL))
{$ELSE}
PAnsiChar(UTF8String(SQL)))
{$ENDIF}
else
QueryHandle := FPlainDriver.ExecuteQuery(ConnectionHandle,
PAnsiChar(AnsiString(SQL)));
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
alexs,
you're great! That's right! FPC2.7.1 uses Codepages now so WE did wrong encode the strings(wondering why the Lazarus display the values wrong while debugging). That was the last statement exec which i've not reworked like all others! I've applied your patch with my simplification. Thanks.
Patch done 1922 \testing.
Edson can you test it?
you're great! That's right! FPC2.7.1 uses Codepages now so WE did wrong encode the strings(wondering why the Lazarus display the values wrong while debugging). That was the last statement exec which i've not reworked like all others! I've applied your patch with my simplification. Thanks.
Patch done 1922 \testing.
Edson can you test it?
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Hi Edson,
I've allready propsed to close your issue report. They have marked it as resolved. You can close this issue right now.
I've allready propsed to close your issue report. They have marked it as resolved. You can close this issue right now.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/