Einzelnen Beitrag anzeigen

manfred_h

Registriert seit: 4. Nov 2005
Ort: Basel
442 Beiträge
 
Delphi XE2 Enterprise
 
#23

AW: Umlaute // Lazarus 1.4.2 mit Datenbank

  Alt 2. Okt 2015, 22:03
Hier das neueste Update:

Sieht im Moment nicht so gut aus...

Zitat:
the main difference between Delphi and Lazarus: Delphi uses UTF16 for unicode support in comparing Lazarus that uses UFT8 ...
RO/DA use UTF16 for unicode support because it other our platforms (.NET/Cocoa/etc) also use UTF16.

as a workaround, you can use my suggestion from previous post and manually convert UTF16 into UTF8
another solution is convert UTF16 to UTF8 by request in OnGetText event
Delphi-Quellcode:
procedure TForm1.tbl_test31144_utf8WSTRGetText(Sender: TDACustomField;
  var Text: string; DisplayText: boolean);
begin
  if Sender.DataType = datWideString then Text := UTF8Encode(Sender.asWideString);
end;
Zitat:
in this case, data in grid will be shown correctly, but it will require fix in TDataSet.DataConvert, also manual encoding will be required if you wanted to use UTF16 string in lazarus controls like edit/memo
  Mit Zitat antworten Zitat