Fink_Sven
(Fink Sven)
July 16, 2017, 11:40pm
1
I'm using TMS ComponentPack 8.7 with
TAdvanedStringGrid 8.3.1
When exporting an AdvStringGrid to a Pdf with AdvGridPDFIO, it can happen that umlauts are transformed to "Ö" (insteal of "Ö").
I use TRichEditor as Cell Editor and it seems it happens when I change the font. At least it happens when I change the font to "Arial" or "Microsoft Sans Serif", I didn't try more fonts.
I did various tests and I cannot reproduce this.
Do you use the latest version of the components?
Test code:
procedure TForm1.Button1Click(Sender: TObject);
begin
advgridpdfio1.Save('e:\tms\temp\specialchars.pdf');
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
advstringgrid1.Options := advstringgrid1.Options + [goEditing];
AdvStringGrid1.DefaultEditor := edRichEdit;
advstringgrid1.Cells[1,1] := 'Düsseldorf';
advstringgrid1.Cells[1,2] := '<b>Köln</b>';
end;
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
if fontdialog1.Execute then
begin
AdvStringGrid1.InplaceRichEdit.SelAttributes.Name := FontDialog1.Font.Name;
AdvStringGrid1.InplaceRichEdit.SelAttributes.Size := FontDialog1.Font.Size;
end;
end; I changed the font at runtime to various fonts for the selected text with umlauts and I could never see an incorrect character exported. If a problem persists, please isolate this and provide some sample source application + detailed steps with which we can reproduce this here.