[patch_done] Bug insert record russian symbols Linux Lazarus
Moderators: gto, EgonHugeist, olehs
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Hmm here i thing the Grid did not update the TField. Which means press insert on the DBNavigator then type in your russian chars. Change the cursor-position to your id Field. And click post on the Navigator. Are the changes posted? If this is true then Zeos isn't the Problem here...
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
ism,
report the problem to FPC/Lazarus-Forum..
report the problem to FPC/Lazarus-Forum..
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/
Note that "ansi" is a dangerous term. It might be UTF8.EgonHugeist wrote: Eventually the FPC UTF8ToAnsi doesn't work for Linux..
That's something i wanted to do long times before.
In bpoth FPC and Delphi terms it means "the system 1-byte encoding", which on *nix can be (and often is in full size distributions) UTF-8
Note that to keep depencies low, on Linux and FreeBSD the "cwstring" unit must be included in the project to enable unicode support (automatic conversions between ansistring and unicodestring, as well as all other conversions provided by FPC).
In svn lazrus trunk , fixed , test it
http://bugs.freepascal.org/view.php?id=21489
http://bugs.freepascal.org/view.php?id=21489
Lazarus 1.0.8 fpc 2.6.0
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
marcov,
I only changed the defaults of the cached-resultsets. This is a patch i've implemented because of some old detected bugs (in UTF8-Mode). The theme was editing/posting some ascendent-chars and compare them with source constants. This was impossible with delphi and a Unicode-Connection...
This function returns always Ansi-one-byte chars so thats absolutly wanted in this case. Do you see issus here?marcov wrote: function TZAbstractCachedResultSet.GetString(ColumnIndex: Integer; const CharEncoding: TZCharEncoding = {$IFDEF FPC}ceUTF8{$ELSE}ceAnsi{$ENDIF}): Ansistring;
var
UseEncoding: TZCharEncoding;
WS: WideString;
begin
{$IFNDEF DISABLE_CHECKING}
CheckAvailable;
{$ENDIF}
if CharEncoding = ceDefault then
UseEncoding := ClientCodePage^.Encoding
else
UseEncoding := CharEncoding;
case ClientCodePage^.Encoding of
ceAnsi:
case UseEncoding of
ceAnsi: Result := AnsiString(FRowAccessor.GetString(ColumnIndex, LastWasNull));
ceUTF8: Result := AnsiToUTF8(FRowAccessor.GetString(ColumnIndex, LastWasNull));
ceUTF16:
begin
WS := UTF8ToString(AnsiToUTF8(FRowAccessor.GetString(ColumnIndex, LastWasNull)));
Result := Copy(UTF8Encode(WS), 1, Length(UTF8Encode(WS)));;
end;
{$IFNDEF MSWINDOWS}
ceUTF32: ;
{$ENDIF}
end;
ceUTF8:
case UseEncoding of
ceAnsi: Result := AnsiString(UTF8ToAnsi(FRowAccessor.GetString(ColumnIndex, LastWasNull)));
ceUTF8: Result := AnsiString(FRowAccessor.GetString(ColumnIndex, LastWasNull));
ceUTF16:
begin
WS := FRowAccessor.GetUnicodeString(ColumnIndex, LastWasNull);
Result := Copy(UTF8Encode(WS), 1, Length(UTF8Encode(WS)));;
end;
{$IFNDEF MSWINDOWS}
ceUTF32: ;
{$ENDIF}
end;
ceUTF16: ;
{$IFNDEF MSWINDOWS}
ceUTF32: ;
{$ENDIF}
end;
end;
I only changed the defaults of the cached-resultsets. This is a patch i've implemented because of some old detected bugs (in UTF8-Mode). The theme was editing/posting some ascendent-chars and compare them with source constants. This was impossible with delphi and a Unicode-Connection...
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/