Autor Beitrag
Siluro
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 74

Win XP Prof., Win XP64 Prof., Win 7 Prof.
Delphi 7 Ent., Delphi XE, Delphi XE5
BeitragVerfasst: Do 19.10.06 11:02 
Hi,
ich hab ein Problem beim anzeigen von Unicode(kyrillischen Zeichen) in Fastreport. Wenn ich den Text direkt in ein frxMemo schreibe und als Charset OEM_Charset wähle gibts kein Problem. Wenn ich die Werte aber nicht fest in das Memo schreibe, sondern aus einer Query hole, bekomme ich statt Unicode ASCII-Code angezeigt. Die Einstellungen beim Report und in den Memos sind identisch mit denen, in die ich feste Werte eingetragen habe. Hat jemand ne Idee woran das liegen könnte?

Bin für jeden Hinweis dankbar.

MfG

Björn
Siluro Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 74

Win XP Prof., Win XP64 Prof., Win 7 Prof.
Delphi 7 Ent., Delphi XE, Delphi XE5
BeitragVerfasst: Mo 23.10.06 12:07 
Hi,
ich hab das Problem jetzt gelöst, indem ich die Funktion UTF8Decode in Fastreport eingebaut habe. Funktioniert bestens, der einzige Nachteil ist das man die Reporte danach anpassen muss. Für alle die es interessiert, hier der Code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TForm1.FormCreate(Sender: TObject);
begin
  frxReport.AddFunction('function UTF8Decode(const S: UTF8String): WideString');
end;

function TForm1.frxReportUserFunction(const MethodName: String;
  var Params: Variant): Variant;
begin
  if ansicomparetext('UTF8Decode', MethodName) = 0 then begin
    try
      result := UTF8Decode(params[0]);
    except
      result := 'FEHLER';
    end;
  end;
end;

MfG

Björn