LazUtils, Translations unit: when reading resource string files, do not escape TAB character with its code representation ('#9'), it is handled just fine both by our translation system and Poedit

git-svn-id: trunk@60411 -
This commit is contained in:
maxim 2019-02-12 18:59:48 +00:00
parent cdbf14375f
commit 7e998b13d9

View File

@ -1245,11 +1245,11 @@ var
end;
Value := AdjustLineBreaks(Value);
end;
// po requires special characters as #number
// escape special characters as #number, do not confuse translators
p:=1;
while p<=length(Value) do begin
j := UTF8CodepointSize(pchar(@Value[p]));
if (j=1) and (Value[p] in [#0..#9,#11,#12,#14..#31,#127..#255]) then
if (j=1) and (Value[p] in [#0..#8,#11,#12,#14..#31,#127..#255]) then
Value := copy(Value,1,p-1)+'#'+IntToStr(ord(Value[p]))+copy(Value,p+1,length(Value))
else
inc(p,j);