You've already forked lazarus-ccr
PowerPDF, convert UTF-8 to ANSI, currently it doesn't support more..
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@717 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1055,14 +1055,19 @@ const
|
||||
var
|
||||
i, j: integer;
|
||||
flg: boolean;
|
||||
S: string;
|
||||
begin
|
||||
// If text contains chars to need escape, replace text using "\".
|
||||
//
|
||||
// TODO: implement UNICODE support in powerpdf. Currently we can't do
|
||||
// any better than converting utf-8 strings to unicode.
|
||||
S := UTF8ToAnsi(Value);
|
||||
result := '';
|
||||
for i := 1 to Length(Value) do
|
||||
for i := 1 to Length(S) do
|
||||
begin
|
||||
flg := false;
|
||||
for j := 1 to Length(EscapeChars) do
|
||||
if Value[i] = EscapeChars[j] then
|
||||
if S[i] = EscapeChars[j] then
|
||||
begin
|
||||
result := result + '\' + ReplaceChars[j];
|
||||
flg := true;
|
||||
@ -1070,7 +1075,7 @@ begin
|
||||
end;
|
||||
|
||||
if not flg then
|
||||
result := result + Value[i];
|
||||
result := result + S[i];
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Version Minor="9"/>
|
||||
<Version Minor="9" Release="1"/>
|
||||
<Files Count="12">
|
||||
<Item1>
|
||||
<Filename Value="PdfTypes.pas"/>
|
||||
|
Reference in New Issue
Block a user