Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

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.


© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum