can't print 'ü','ö','ä' lazarus / 1-Linux ---------------------------------------------------------------------- ace · 2006-10-21 11:32 Hi , i can't print 'ü','ö','ä' with lazarus. example: i write 'ä' the printer prints ' Ķ' why? My os is ubuntu/Kubuntu :cry: ---------------------------------------------------------------------- felipemdc · 2006-10-21 11:42 Which commands are you using to print? ---------------------------------------------------------------------- ace · 2006-10-21 13:33 Hi sekel, i take this commands Code: [Select]  procedure TForm1.ToolButton6Click(Sender: TObject); var drucker : Tprinter; var H, Line : Integer; begin    if PrintDialog1.Execute then      begin   Drucker := Printer;    Drucker.BeginDoc;      Drucker.Canvas.Font.Name := 'Arial';        Drucker.Canvas.Font.Size := 12;          H := Drucker.Canvas.TextHeight('Gg') + 2;            for Line := 0 to memo.Lines.Count do begin              Drucker.Canvas.TextOut(25, 25 + Line * H, memo.Lines[Line]); end; Drucker.EndDoc; end; end; ace :roll: ---------------------------------------------------------------------- felipemdc · 2006-10-21 15:29 I am guessing, but I think that the printer expects UTF-8 encoding, and Lazarus GTK 1 interface outputs ISO encoding. You can try to fix this by changing this line:              Drucker.Canvas.TextOut(25, 25 + Line * H, memo.Lines[Line]); to:              Drucker.Canvas.TextOut(25, 25 + Line * H, AnsiToUTF8(memo.Lines[Line])); or something similar ---------------------------------------------------------------------- ace · 2006-10-21 17:51 Hi sekel, i changed the line but i have the same problem.Any idea? the follow lines can i read in /var/lib/locales/supported.d/de de_DE.UTF-8 UTF-8 de_CH.UTF-8 UTF-8 de_BE.UTF-8 UTF-8 de_LU.UTF-8 UTF-8 de_AT.UTF-8 UTF-8 de_DE@euro ISO-8859-15 ace ---------------------------------------------------------------------- felipemdc · 2006-10-21 18:58 Maybe it's the other way around. Your system is passing UTF-8 to LCL that doesn't modify it, but the printer driver expects ISO. So you could try: Drucker.Canvas.TextOut(25, 25 + Line * H, UTF8ToAnsi(memo.Lines[Line])); ---------------------------------------------------------------------- ace · 2006-10-22 15:42 That's it ,Thanks sekel     MfG ace