Frequently Asked Question:
How do I encode a string with UTF8 encoding?
Question
How do I encode a string with UTF8 encoding?
Answer
Different languages will have different functions to do the UTF8 encoding. For Delphi, the Utf8Encode function can be used, for example:
var
FileNameW: WideString;
FileNameA: AnsiString;
begin
FileNameW := WideString('C:\unicode') + WideChar(20081) +
WideString('\test.pdf');
FileNameA := Utf8Encode(FileNameW);
QP.SaveToFile(FileNameA);
end;
That would save the file in the "C:\unicode\test.pdf" folder.