mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-23 11:39:09 +02:00
LazUtils, Translations unit: when reading PO file, '\t' sequences are converted to TABs (code #9). Now for symmetry TABs are converted back to '\t' when writing PO files.
git-svn-id: trunk@60369 -
This commit is contained in:
parent
c91b1321e0
commit
c1e3ea24a0
@ -304,7 +304,7 @@ var
|
||||
begin
|
||||
NewLength:=length(s);
|
||||
for SrcPos:=1 to length(s) do
|
||||
if s[SrcPos] in ['"','\'] then inc(NewLength);
|
||||
if s[SrcPos] in ['"','\',#9] then inc(NewLength);
|
||||
if NewLength=length(s) then begin
|
||||
Result:=s;
|
||||
end else begin
|
||||
@ -319,6 +319,13 @@ begin
|
||||
Result[DestPos]:=s[SrcPos];
|
||||
inc(DestPos);
|
||||
end;
|
||||
#9:
|
||||
begin
|
||||
Result[DestPos]:='\';
|
||||
inc(DestPos);
|
||||
Result[DestPos]:='t';
|
||||
inc(DestPos);
|
||||
end;
|
||||
else
|
||||
Result[DestPos]:=s[SrcPos];
|
||||
inc(DestPos);
|
||||
|
Loading…
Reference in New Issue
Block a user