try to work with UTF8 strings like "кщиуке" in MySQL.
I tested with another Connection Component and it is working with UTF8, but i don´t want to change all my code.
After changing
Code: Select all
function TZAbstractRODataset.GetFieldData(Field: TField; Buffer: Pointer): Boolean;
...
ftWideString:
begin
{$IFDEF BDS4_UP}
if self.connection.UseUnicode // new property
then WStrCopy(Buffer, PWideChar(UTF8Decode(RowAccessor.GetUnicodeString(ColumnIndex, Result))))
else WStrCopy(Buffer, PWideChar(RowAccessor.GetUnicodeString(ColumnIndex, Result)));
{$ELSE}
PWideString(Buffer)^ := RowAccessor.GetUnicodeString(ColumnIndex, Result);
{$ENDIF}
Result := not Result;
end;
...
When i try to post such UTF8 - strings, then i see only '??????',
i think there is an problem in
Code: Select all
procedure TZRowAccessor.SetUnicodeString(ColumnIndex: Integer; Value: WideString);
....
System.Move(PWideString(Value)^,
Pointer(@FBuffer.Columns[FColumnOffsets[ColumnIndex - 1] + 1])^,
Length(Value) * 2 + 2);
...
- Delphi 2010
MySQL 5
Zeos 7 alpha
Thanks for help!